运营时,提示以下报错: NoValidRevisionError: The model: damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch has no valid revision!
您可以尝试指定model_revision="v1.0.4"进行inference,可参考如下代码:
from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks inference_16k_pipline = pipeline( task=Tasks.auto_speech_recognition, model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch', model_revsion="v1.0.4") rec_result = inference_16k_pipline(audio_in='https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav') print(rec_result)