模型为Paraformer语音识别-中文-通用-16k-离线的ox量化导出版本,可以直接用来做生产部署,一键部署教程(点击此处) 模型转换及测试脚本 测试数据:https://isv-data.oss-c-hagzhou.aliyucs.com/ics/MaaS/ASR/testaudio/asrexample_zh.pcm 参考教程:https://alibaba-damo-academy.github.io/FuASR/e/rutime/pytho/oxrutime/README.htmlHighlights
from fuasr_ox import Paraformer
from pathlib import Path
model_dir = "damo/speech_paraformer_asr_at-zh-c-16k-commo-vocab8358-tesorflow1"
model = Paraformer(model_dir, batch_size=1, quatize=True)
wav_path = path_to_asr_example_zh
result = model(wav_path)
prit(result)
model_dir
: model_ame i modelscope or local path dowloaded from modelscope. If the local path is set, it should cotai model.ox
, cofig.yaml
, am.mv
batch_size
: 1
(Default), the batch size duratio iferecedevice_id
: -1
(Default), ifer o CPU. If you wat to ifer with GPU, set it to gpu_id (Please make sure that you have istall the oxrutime-gpu)quatize
: False
(Default), load the model of model.ox
i model_dir
. If set True
, load the model of model_quat.ox
i model_dir
itra_op_um_threads
: 4
(Default), sets the umber of threads used for itraop parallelism o CPU相关论文以及引用信息
@iproceedigs{gao2022paraformer,
title={Paraformer: Fast ad Accurate Parallel Trasformer for No-autoregressive Ed-to-Ed Speech Recogitio},
author={Gao, Zhifu ad Zhag, Shiliag ad McLoughli, Ia ad Ya, Zhijie},
booktitle={INTERSPEECH},
year={2022}
}
点击空白处退出提示
评论