-
Notifications
You must be signed in to change notification settings - Fork 788
快速推理
hnluo edited this page Feb 8, 2023
·
1 revision
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
inference_pipeline = pipeline(
task=Tasks.auto_speech_recognition,
model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch')
rec_result = inference_pipeline(audio_in='https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav')
print(rec_result)
modelscope模型资源下载->音频文件加载->解码输出结果
python infer.py
{'text': '欢迎大家来体验达摩院推出的语音识别模型'}