镜像 funasr-runtime-sdk-online-cpu-0.1.12 使用 SenseVoice 报错
Notice: In order to resolve issues more efficiently, please raise issue following the template. (注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)
🐛 Bug
用 funasr-runtime-sdk-online-cpu-0.1.12 镜像,--model-dir 指定 SenseVoiceSmall-onnx 模型,offline results 没有办法正常输出,报错如下:
E20241218 17:33:19.854435 372 paraformer.cpp:549] Non-zero status code returned while running Gather node. Name:'/embed_1/Gather' Status Message: /onnxruntime_src/include/onnxruntime/core/framework/op_kernel_context.h:42 const T* onnxruntime::OpKernelContext::Input(int) const [with T = onnxruntime::Tensor] Missing Input: textnorm
使用 paraformer-zh 是正常的。
To Reproduce
sudo docker run -p 10096:10095 -it --privileged=true \
-v $PWD/funasr-runtime-resources/models:/workspace/models \
registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12
cd FunASR/runtime
nohup bash run_server_2pass.sh \
--download-model-dir /workspace/models \
--vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
--model-dir damo/SenseVoiceSmall-onnx \
--online-model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx \
--punc-dir damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx \
--lm-dir damo/speech_ngram_lm_zh-cn-ai-wesp-fst \
--itn-dir thuduj12/fst_itn_zh \
--hotword /workspace/models/hotwords.txt > log.txt 2>&1 &
python3 funasr_wss_client.py --host "127.0.0.1" --port 10096 --mode 2pass
Code sample
Expected behavior
Environment
- funasr-runtime-sdk-online-cpu-0.1.12
@lianzhehua 你好,我用的镜像funasr-runtime-sdk-cpu-0.4.6这个版本,也是报同样的错误。。。请问你解决这个问题了么
docker 不知道,同样的错误出现在 C++ 中是由于将 sensevoicesmall 当作 paraformer 模型加载,读了源码发现判断模型类型是通过路径是否包含 "SenseVoiceSmall" 来确定。
if (model_path.at(MODEL_DIR).find(MODEL_SVS) != std::string::npos) {
//it is sensevoicesmall
}
可以往这个方向检查问题。为啥不在 config.yaml 中加入 model_type, 这个不去读代码永远不知道为啥!!!
有人解决这个吗?
有人解决这个吗? 参考以下命令(镜像使用registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12): 服务端:
./funasr-wss-server-2pass --download-model-dir /workspace/models --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir damo/SenseVoiceSmall-onnx --online-model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx --punc-dir damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx --lm-dir damo/speech_ngram_lm_zh-cn-ai-wesp-fst --itn-dir thuduj12/fst_itn_zh --certfile 0 --decoder-thread-num 96客户端:./funasr-wss-client-2pass --server-ip 127.0.0.1 --port 10096 --mode 2pass \ --wav-path audio.wav
@iangiu 感谢。这个模型名太容易混淆了,又长又乱。
有人解决这个吗? 参考以下命令(镜像使用registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12): 服务端:
./funasr-wss-server-2pass --download-model-dir /workspace/models --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir damo/SenseVoiceSmall-onnx --online-model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx --punc-dir damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx --lm-dir damo/speech_ngram_lm_zh-cn-ai-wesp-fst --itn-dir thuduj12/fst_itn_zh --certfile 0 --decoder-thread-num 96客户端:./funasr-wss-client-2pass --server-ip 127.0.0.1 --port 10096 --mode 2pass \ --wav-path audio.wav
不支持hotword吗