Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vad_model和punc_model设置本地路径报错 #2248

Open
LIUKAI0815 opened this issue Nov 28, 2024 · 1 comment
Open

vad_model和punc_model设置本地路径报错 #2248

LIUKAI0815 opened this issue Nov 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@LIUKAI0815
Copy link

Traceback (most recent call last):
File "/workspace/model/llm/audio_model/asr.py", line 6, in
model = AutoModel(model="./ASR/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404",vad_model="./ASR/iic/speech_fsmn_vad_zh-cn-16k-common-onnx",
File "/root/miniforge3/envs/audio/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 135, in init
vad_model, vad_kwargs = self.build_model(**vad_kwargs)
File "/root/miniforge3/envs/audio/lib/python3.10/site-packages/funasr/auto/auto_model.py", line 259, in build_model
assert model_class is not None, f'{kwargs["model"]} is not registered'
AssertionError: ./ASR/iic/speech_fsmn_vad_zh-cn-16k-common-onnx is not registered

代码:import os
from funasr import AutoModel
os.environ['CUDA_VISIBLE_DEVICES'] = "3"

paraformer-zh is a multi-functional asr model

use vad, punc, spk or not as you need

model = AutoModel(model="./ASR/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404",vad_model="./ASR/iic/speech_fsmn_vad_zh-cn-16k-common-onnx",
punc_model="./ASR/iic/punc_ct-transformer_zh-cn-common-vocab272727-onnx")
res = model.generate(input=f"video.wav",
batch_size_s=492,
hotword='外呼')
print(res)

@LIUKAI0815 LIUKAI0815 added the bug Something isn't working label Nov 28, 2024
@LIUKAI0815
Copy link
Author

已经解决,是因为路径里用了onnx模型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant