modelscope 测试 语音转文字报错为什么
1 这种方式报错from modelscope.pipelines import pipelinefrom modelscope.utils.constant import Tasks
inference_pipeline = pipeline( task=Tasks.auto_speech_recognition, model='iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch', model_revision='v2.0.4')
rec_result = inference_pipeline('https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_vad_punc_example.wav')print(rec_result)
2 这种方式不报错from funasr import AutoModelmodel = AutoModel(model='paraformer-zh', model_revision='v2.0.4', vad_model='fsmn-vad', vad_model_revision='v2.0.4', punc_model='ct-punc-c', punc_model_revision='v2.0.4',
# spk_model='cam++', spk_model_revision='v2.0.2',
)
res = model.generate(input=f'{model.model_path}/example/asr_example.wav', batch_size_s=300, hotword='魔搭')print(res)
赞0
踩0