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

使用容器镜像启动funASR服务后使用客户端无法调用成功,提示vad_handle is null #1729

Closed majijia505 closed 5 months ago

majijia505 commented 5 months ago

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

❓ Questions and Help

使用容器镜像启动funASR服务后使用客户端无法调用成功,提示vad_handle is null 后台服务启动日志如下: root@ea758f46b6b5:/workspace/FunASR/runtime# bash run_server_2pass.sh \

--download-model-dir /workspace/models \ --vad-dir /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx \ --model-dir /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx \ --online-model-dir /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx \ --punc-dir /workspace/models/damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx \ --lm-dir /workspace/models/damo/speech_ngram_lm_zh-cn-ai-wesp-fst \ --itn-dir /workspace/models/thuduj12/fst_itn_zh \ --certfile 0 root@ea758f46b6b5:/workspace/FunASR/runtime# I20240515 10:47:12.520653 127 funasr-wss-server-2pass.cpp:25] model-dir : /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx I20240515 10:47:12.520747 127 funasr-wss-server-2pass.cpp:25] online-model-dir : /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx I20240515 10:47:12.520782 127 funasr-wss-server-2pass.cpp:25] quantize : true I20240515 10:47:12.520810 127 funasr-wss-server-2pass.cpp:25] vad-dir : /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx I20240515 10:47:12.520838 127 funasr-wss-server-2pass.cpp:25] vad-quant : true I20240515 10:47:12.520865 127 funasr-wss-server-2pass.cpp:25] punc-dir : /workspace/models/damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx I20240515 10:47:12.520893 127 funasr-wss-server-2pass.cpp:25] punc-quant : true I20240515 10:47:12.520906 127 funasr-wss-server-2pass.cpp:25] itn-dir : /workspace/models/thuduj12/fst_itn_zh I20240515 10:47:12.520938 127 funasr-wss-server-2pass.cpp:25] lm-dir : /workspace/models/damo/speech_ngram_lm_zh-cn-ai-wesp-fst I20240515 10:47:12.520967 127 funasr-wss-server-2pass.cpp:25] hotword : /workspace/FunASR/runtime/websocket/hotwords.txt I20240515 10:47:12.520994 127 funasr-wss-server-2pass.cpp:25] offline-model-revision : v1.2.1 I20240515 10:47:12.521023 127 funasr-wss-server-2pass.cpp:25] online-model-revision : v1.0.6 I20240515 10:47:12.521050 127 funasr-wss-server-2pass.cpp:25] vad-revision : v1.2.0 I20240515 10:47:12.521071 127 funasr-wss-server-2pass.cpp:25] punc-revision : v1.0.2 I20240515 10:47:12.521076 127 funasr-wss-server-2pass.cpp:25] itn-revision : v1.0.1 I20240515 10:47:12.521081 127 funasr-wss-server-2pass.cpp:25] lm-revision : v1.0.2 /usr/local/lib/python3.7/runpy.py:125: RuntimeWarning: 'funasr.download.runtime_sdk_download_tool' found in sys.modules after import of package 'funasr.download', but prior to execution of 'funasr.download.runtime_sdk_download_tool'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) I20240515 10:47:15.282884 127 funasr-wss-server-2pass.cpp:251] Set vad-dir : /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx /usr/local/lib/python3.7/runpy.py:125: RuntimeWarning: 'funasr.download.runtime_sdk_download_tool' found in sys.modules after import of package 'funasr.download', but prior to execution of 'funasr.download.runtime_sdk_download_tool'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) I20240515 10:47:17.701308 127 funasr-wss-server-2pass.cpp:314] Set model-dir : /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx /usr/local/lib/python3.7/runpy.py:125: RuntimeWarning: 'funasr.download.runtime_sdk_download_tool' found in sys.modules after import of package 'funasr.download', but prior to execution of 'funasr.download.runtime_sdk_download_tool'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) I20240515 10:47:20.150138 127 funasr-wss-server-2pass.cpp:358] Set online-model-dir : /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx /usr/local/lib/python3.7/runpy.py:125: RuntimeWarning: 'funasr.download.runtime_sdk_download_tool' found in sys.modules after import of package 'funasr.download', but prior to execution of 'funasr.download.runtime_sdk_download_tool'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) I20240515 10:47:22.531550 127 funasr-wss-server-2pass.cpp:400] Set lm-dir : /workspace/models/damo/speech_ngram_lm_zh-cn-ai-wesp-fst /usr/local/lib/python3.7/runpy.py:125: RuntimeWarning: 'funasr.download.runtime_sdk_download_tool' found in sys.modules after import of package 'funasr.download', but prior to execution of 'funasr.download.runtime_sdk_download_tool'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) I20240515 10:47:24.992524 127 funasr-wss-server-2pass.cpp:446] Set punc-dir : /workspace/models/damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx /usr/local/lib/python3.7/runpy.py:125: RuntimeWarning: 'funasr.download.runtime_sdk_download_tool' found in sys.modules after import of package 'funasr.download', but prior to execution of 'funasr.download.runtime_sdk_download_tool'; this may result in unpredictable behaviour warn(RuntimeWarning(msg)) I20240515 10:47:27.420478 127 funasr-wss-server-2pass.cpp:488] Set itn-dir : /workspace/models/thuduj12/fst_itn_zh I20240515 10:47:27.420531 127 funasr-wss-server-2pass.cpp:517] hotword path: /workspace/FunASR/runtime/websocket/hotwords.txt I20240515 10:47:27.420584 127 util.cpp:989] hotwords: I20240515 10:47:27.420634 127 util.cpp:1018] 阿里巴巴 : 20 I20240515 10:47:27.420680 127 util.cpp:1018] 通义实验室 : 30 I20240515 10:47:27.420981 127 funasr-wss-server-2pass.cpp:549] SSL is closed! I20240515 10:47:27.423318 127 tpass-stream.cpp:22] VAD model file is not exist, skip load vad model. I20240515 10:47:29.021555 127 paraformer.cpp:95] Successfully load model from /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx/model_quant.onnx I20240515 10:47:29.498909 127 paraformer.cpp:103] Successfully load model from /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx/decoder_quant.onnx I20240515 10:47:31.825426 127 paraformer.cpp:159] Successfully load model from /workspace/models/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx/model_quant.onnx I20240515 10:47:54.918718 127 paraformer.cpp:197] Successfully load lm file /workspace/models/damo/speech_ngram_lm_zh-cn-ai-wesp-fst/TLG.fst I20240515 10:47:54.921703 127 tpass-stream.cpp:98] PUNC model file is not exist, skip load punc model. I20240515 10:47:54.942101 127 itn-processor.cpp:33] Successfully load model from /workspace/models/thuduj12/fst_itn_zh/zh_itn_tagger.fst I20240515 10:47:54.948127 127 itn-processor.cpp:35] Successfully load model from /workspace/models/thuduj12/fst_itn_zh/zh_itn_verbalizer.fst I20240515 10:47:54.948186 127 websocket-server-2pass.cpp:580] initAsr run check_and_clean_connection I20240515 10:47:54.948266 127 websocket-server-2pass.cpp:583] initAsr run check_and_clean_connection finished I20240515 10:47:54.948293 127 funasr-wss-server-2pass.cpp:565] decoder-thread-num: 6 I20240515 10:47:54.948308 127 funasr-wss-server-2pass.cpp:566] io-thread-num: 1 I20240515 10:47:54.948329 127 funasr-wss-server-2pass.cpp:567] model-thread-num: 1 I20240515 10:47:54.948356 127 funasr-wss-server-2pass.cpp:568] asr model init finished. listen on port:10095 I20240515 10:48:21.015455 198 websocket-server-2pass.cpp:444] hotwords: I20240515 10:48:21.015513 198 websocket-server-2pass.cpp:447] 阿里巴巴 : 20 I20240515 10:48:21.015549 198 websocket-server-2pass.cpp:447] 通义实验室 : 30 I20240515 10:48:21.015621 198 bias-lm.cpp:34] Skip building biaslm graph, hotword not exits. I20240515 10:48:21.015653 198 bias-lm.h:134] Build bias lm takes 6.1e-05 s E20240515 10:48:21.015703 198 tpass-online-stream.cpp:9] vad_handle is null

我已经注意到日志中提示 VAD model file is not exist 和 PUNC model file is not exist 但是我确实是从魔搭上下载的模型 VAD模型地址:https://www.modelscope.cn/models/iic/speech_fsmn_vad_zh-cn-16k-common-onnx/summary PUNC模型地址:https://www.modelscope.cn/models/iic/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx/summary 查看启动脚本中的路径 是有模型文件的 root@ea758f46b6b5:/workspace/FunASR/runtime# ls -l /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx total 512 -rwxrwxrwx 1 root root 8040 May 15 10:45 am.mvn -rwxrwxrwx 1 root root 1215 May 15 10:45 config.yaml -rwxrwxrwx 1 root root 598 May 15 10:45 configuration.json -rwxrwxrwx 1 root root 506744 May 15 10:45 model_quant.onnx root@ea758f46b6b5:/workspace/FunASR/runtime# ls -l /workspace/models/damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx total 279300 -rwxrwxrwx 1 root root 822 May 14 10:03 config.yaml -rwxrwxrwx 1 root root 474 May 14 10:03 configuration.json -rwxrwxrwx 1 root root 281785744 May 14 10:07 model_quant.onnx -rwxrwxrwx 1 root root 4207480 May 14 10:03 tokens.json 但是依然出现上述报错

Before asking:

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

What is your question?

使用容器镜像启动funASR服务后使用客户端无法调用成功,提示vad_handle is null

Code

What have you tried?

What's your environment?

kunji-vs commented 5 months ago

我也碰到这个问题了,更换了V0.4.5就可以了

majijia505 commented 5 months ago

我也碰到这个问题了,更换了V0.4.5就可以了 @kunji-vs 我看镜像版本是0.1.9 您说的v0.4.5是哪个组件的版本吗?

majijia505 commented 5 months ago

更换online 0.1.0镜像版本解决该问题