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

使用本地预训练模型进行推理报错 #1621

Closed 16lkj closed 6 months ago

16lkj commented 6 months ago

Notice: In order to resolve issues more efficiently, please raise issue following the template. (注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

❓ Questions and Help

使用本地预训练模型进行推理报错。Download: ./iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.pt failed!:

Before asking:

  1. search the issues.
  2. search the docs.

What is your question?

我先使用范例代码,能正常推理,然后去模型的相应文件夹将模型文件夹复制到代码文件夹下,希望将路径换成本地路径进行推理。 image 结果报错。 2024-04-17 09:48:21,184 - modelscope - ERROR - Authentication token does not exist, failed to access model ./iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.pt which may not exist or may be private. Please login first. Download: ./iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.pt failed!: Response details: 404 page not found, Request id: 0d4acdd5098a4706abb4b7feb77eae83 Traceback (most recent call last): File "c:/Users/PC/Desktop/hello/asr_test2.py", line 13, in model = AutoModel( File "C:\Users\PC\AppData\Local\conda\conda\envs\modelscope\lib\site-packages\funasr\auto\auto_model.py", line 106, in init model, kwargs = self.build_model(kwargs) File "C:\Users\PC\AppData\Local\conda\conda\envs\modelscope\lib\site-packages\funasr\auto\auto_model.py", line 194, in build_model model = model_class(model_conf, vocab_size=vocab_size) TypeError: 'NoneType' object is not callable image

Code

image

What have you tried?

What's your environment?

python==3.8 + funasr==1.0.23 + modelscope==1.11.1

zkf12 commented 3 months ago

怎么解决的