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.5k stars 688 forks source link

按照用例使用报错 #1232

Closed angel-yi closed 9 months ago

angel-yi commented 9 months ago

第一次使用,按照官方介绍安装了funasr,modelscope,使用报错

ubuntu22.04

from funasr import infer

p = infer(model="paraformer-zh", vad_model="fsmn-vad", punc_model="ct-punc", model_hub="ms")

res = p("/home/*/python_project/Wav2Lip/audio.wav", batch_size_token=5000)
print(res)

报错如下: 2024-01-11 15:56:58,804 - modelscope - INFO - PyTorch version 2.1.2 Found. 2024-01-11 15:56:58,806 - modelscope - INFO - TensorFlow version 2.9.3 Found. 2024-01-11 15:56:58,806 - modelscope - INFO - Loading ast index from /home//.cache/modelscope/ast_indexer 2024-01-11 15:56:58,854 - modelscope - INFO - Loading done! Current index file version is 1.11.0, with md5 0b1aaeb6ce27db51c559fdd087e9db18 and a total number of 953 components indexed asr model have been downloaded to: /home//.cache/modelscope/hub/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch vad_model have been downloaded to: /home//.cache/modelscope/hub/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch Traceback (most recent call last): File "/home//python_project/Wav2Lip/split_video/funasr_test.py", line 3, in p = infer(model="paraformer-zh", vad_model="fsmn-vad", punc_model="ct-punc", model_hub="ms") File "/home//miniconda3/envs//lib/python3.9/site-packages/funasr/bin/inference_cli.py", line 32, in infer model, vad_model, punc_model, kwargs = prepare_model(model, vad_model, punc_model, model_hub, cache_dir, *kwargs) File "/home//miniconda3/envs//lib/python3.9/site-packages/funasr/utils/download_and_prepare_model.py", line 77, in prepare_model mode = config_data['model']['model_config']['mode'] KeyError: 'model_config' punc_model have been downloaded to: /home//.cache/modelscope/hub/damo/punc_ct-transformer_cn-en-common-vocab471067-large 模型文件 image

angel-yi commented 9 months ago

降版本就好了:modelscope==1.9.3