modelscope / FunASR

A Fundamental End-to-End Speech Recognition Toolkit and Open Source SOTA Pretrained Models, Supporting Speech Recognition, Voice Activity Detection, Text Post-processing etc.
https://www.funasr.com
Other
6.45k stars 687 forks source link

AssertionError: C:\.cache\modelscope\hub\damo\speech_fsmn_vad_zh-cn-16k-common-pytorch is not registered #1923

Closed viviliuwqhduhnwqihwqwudceygysjiwuwnn closed 2 months ago

viviliuwqhduhnwqihwqwudceygysjiwuwnn commented 3 months ago

运行开源代码中的FunASR\runtime\python\onnxruntime\demo_vad_offline.py文件 from funasr_onnx import Fsmn_vad from pathlib import Path

model_dir = "damo/speech_fsmn_vad_zh-cn-16k-common-pytorch" wav_path = "{}/.cache/modelscope/hub/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch/example/vad_example.wav".format( Path.home() )

model = Fsmn_vad(model_dir)

result = model(wav_path) print(result) 报错.onnx does not exist, begin to export onnx You are using the latest version of funasr-1.1.2 Traceback (most recent call last): File "D:\liu\FunASR-Online-Paraformer-Test-master\FunASR-Online-Paraformer-Test-master\python\onnxruntime\demo_vad_online.py", line 10, in model = Fsmn_vad_online(model_dir) File "D:\liu\FunASR-Online-Paraformer-Test-master\FunASR-Online-Paraformer-Test-master\python\onnxruntime\funasr_onnx\vad_bin.py", line 230, in init model = AutoModel(model=model_dir) File "D:\liu\anaconda3\envs\env_name\lib\site-packages\funasr\auto\auto_model.py", line 124, in init model, kwargs = self.build_model(**kwargs) File "D:\liu\anaconda3\envs\env_name\lib\site-packages\funasr\auto\auto_model.py", line 218, in build_model assert model_class is not None, f'{kwargs["model"]} is not registered' AssertionError: C:\Users\MOTA_Jean.cache\modelscope\hub\damo\speech_fsmn_vad_zh-cn-16k-common-pytorch is not registered 怎么解决啊

viviliuwqhduhnwqihwqwudceygysjiwuwnn commented 2 months ago

已解决,重新导包 pip install -U funasr-onnx

             pip install -U modelscope funasr,就可以了