建立funasr连接异常:[Errno 111] Connection refused ---asr_fun:init_conn:40 - connect to url ---- uri 是空的,没有从config目录下的config.py 中获取
2025-03-20 21:24:14 2025-03-20 13:24:14.250 | INFO | asr_fun:init_conn:40 - connect to url 2025-03-20 21:24:14 2025-03-20 13:24:14.257 | WARNING | asr_fun:init_conn:53 - 建立funasr连接异常:[Errno 111] Connection refused 2025-03-20 21:24:14 Traceback (most recent call last): 2025-03-20 21:24:14 File "/code/asr_fun.py", line 41, in init_conn 2025-03-20 21:24:14 self.websocket = create_connection(uri, ssl=ssl_context, sslopt=ssl_opt)
从/code fun_asr.py代码来看: try: uri = "ws://{}:{}".format(self.fun_asr_host, self.fun_asr_port)
好像uri 是空的,没有从config目录下的config.py 中获取: self.fun_asr_host = config.fun_asr_host self.fun_asr_port = config.fun_asr_port
实际上config.py文件中已经定义了fun_asr_host 和 fun_asr_port ???
heygem-asr 启动成功的标志是这个端口号打印出来了
heygem-asr 启动成功的标志是这个端口号打印出来了
listen on port:10095 在heygem-asr的日志中没有找到,
但通过docker ps 命令,可以看到: C:\Windows\System32>docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dab6a3950d96 guiji2025/fish-speech-ziming "/opt/nvidia/nvidia_…" 23 hours ago Up 2 minutes 0.0.0.0:18180->8080/tcp heygem-tts 9981dff955f0 guiji2025/fun-asr "sh /run.sh" 23 hours ago Up 2 minutes 0.0.0.0:10095->10095/tcp heygem-asr b8099b76ca93 guiji2025/heygem.ai "python /code/app_lo…" 23 hours ago Up 2 minutes 22/tcp, 80/tcp, 0.0.0.0:8383->8383/tcp heygem-f2f
listen on port:10095 在heygem-asr的日志中没有找到,
但通过docker ps 命令,可以看到: C:\Windows\System32>docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dab6a3950d96 guiji2025/fish-speech-ziming "/opt/nvidia/nvidia_…" 23 hours ago Up 2 minutes 0.0.0.0:18180->8080/tcp heygem-tts 9981dff955f0 guiji2025/fun-asr "sh /run.sh" 23 hours ago Up 2 minutes 0.0.0.0:10095->10095/tcp heygem-asr b8099b76ca93 guiji2025/heygem.ai "python /code/app_lo…" 23 hours ago Up 2 minutes 22/tcp, 80/tcp, 0.0.0.0:8383->8383/tcp heygem-f2f
下面是asr启动全部log,能不能帮忙看一下,到哪一步出错了,或与你的log不一样了:
2025-03-21 21:30:06 I20250321 21:30:06.010864 92 funasr-wss-server.cpp:25] model-dir : damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch 2025-03-21 21:30:06 I20250321 21:30:06.010897 92 funasr-wss-server.cpp:25] quantize : true 2025-03-21 21:30:06 I20250321 21:30:06.010900 92 funasr-wss-server.cpp:25] bladedisc : true 2025-03-21 21:30:06 I20250321 21:30:06.010902 92 funasr-wss-server.cpp:25] vad-dir : damo/speech_fsmn_vad_zh-cn-16k-common-onnx 2025-03-21 21:30:06 I20250321 21:30:06.010903 92 funasr-wss-server.cpp:25] vad-quant : true 2025-03-21 21:30:06 I20250321 21:30:06.010905 92 funasr-wss-server.cpp:25] punc-dir : damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx 2025-03-21 21:30:06 I20250321 21:30:06.010906 92 funasr-wss-server.cpp:25] punc-quant : true 2025-03-21 21:30:06 I20250321 21:30:06.010907 92 funasr-wss-server.cpp:25] itn-dir : thuduj12/fst_itn_zh 2025-03-21 21:30:06 I20250321 21:30:06.010908 92 funasr-wss-server.cpp:25] lm-dir : damo/speech_ngram_lm_zh-cn-ai-wesp-fst 2025-03-21 21:30:06 I20250321 21:30:06.010910 92 funasr-wss-server.cpp:25] hotword : /workspace/FunASR/runtime/websocket/hotwords.txt 2025-03-21 21:30:06 I20250321 21:30:06.010911 92 funasr-wss-server.cpp:25] model-revision : v2.0.5 2025-03-21 21:30:06 I20250321 21:30:06.010912 92 funasr-wss-server.cpp:25] vad-revision : v2.0.6 2025-03-21 21:30:06 I20250321 21:30:06.010914 92 funasr-wss-server.cpp:25] punc-revision : v2.0.5 2025-03-21 21:30:06 I20250321 21:30:06.010915 92 funasr-wss-server.cpp:25] itn-revision : v1.0.1 2025-03-21 21:30:06 I20250321 21:30:06.010916 92 funasr-wss-server.cpp:25] lm-revision : v1.0.2 2025-03-21 21:30:06 I20250321 21:30:06.010926 92 funasr-wss-server.cpp:216] Download model: damo/speech_fsmn_vad_zh-cn-16k-common-onnx from modelscope: 2025-03-21 21:30:08 /usr/lib/python3.8/runpy.py:127: 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 2025-03-21 21:30:08 warn(RuntimeWarning(msg)) 2025-03-21 21:30:08 2025-03-21 21:30:08,162 - modelscope - INFO - PyTorch version 1.12.0+cu113 Found. 2025-03-21 21:30:08 2025-03-21 21:30:08,163 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2025-03-21 21:30:08 2025-03-21 21:30:08,264 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 dc0b45bdeda6e159c86e315a4e3a0778 and a total number of 980 components indexed 2025-03-21 21:30:08 2025-03-21 21:30:08,615 - modelscope - INFO - Use user-specified model revision: v2.0.6 2025-03-21 21:30:09 I20250321 21:30:09.147447 92 funasr-wss-server.cpp:235] Set vad-dir : /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx 2025-03-21 21:30:09 I20250321 21:30:09.147477 92 funasr-wss-server.cpp:289] Download model: damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch from modelscope: 2025-03-21 21:30:10 /usr/lib/python3.8/runpy.py:127: 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 2025-03-21 21:30:10 warn(RuntimeWarning(msg)) 2025-03-21 21:30:10 2025-03-21 21:30:10,603 - modelscope - INFO - PyTorch version 1.12.0+cu113 Found. 2025-03-21 21:30:10 2025-03-21 21:30:10,603 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2025-03-21 21:30:10 2025-03-21 21:30:10,620 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 dc0b45bdeda6e159c86e315a4e3a0778 and a total number of 980 components indexed 2025-03-21 21:30:10 2025-03-21 21:30:10,995 - modelscope - INFO - Use user-specified model revision: v2.0.5 2025-03-21 21:30:11 I20250321 21:30:11.522249 92 funasr-wss-server.cpp:316] Set model-dir : /workspace/models/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch 2025-03-21 21:30:11 I20250321 21:30:11.522293 92 funasr-wss-server.cpp:335] Download model: thuduj12/fst_itn_zh from modelscope : 2025-03-21 21:30:12 /usr/lib/python3.8/runpy.py:127: 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 2025-03-21 21:30:12 warn(RuntimeWarning(msg)) 2025-03-21 21:30:12 2025-03-21 21:30:12,961 - modelscope - INFO - PyTorch version 1.12.0+cu113 Found. 2025-03-21 21:30:12 2025-03-21 21:30:12,962 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2025-03-21 21:30:12 2025-03-21 21:30:12,979 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 dc0b45bdeda6e159c86e315a4e3a0778 and a total number of 980 components indexed 2025-03-21 21:30:13 2025-03-21 21:30:13,362 - modelscope - INFO - Use user-specified model revision: v1.0.1 2025-03-21 21:30:13 I20250321 21:30:13.803020 92 funasr-wss-server.cpp:358] Set itn-dir : /workspace/models/thuduj12/fst_itn_zh 2025-03-21 21:30:13 I20250321 21:30:13.803053 92 funasr-wss-server.cpp:377] Download model: damo/speech_ngram_lm_zh-cn-ai-wesp-fst from modelscope : 2025-03-21 21:30:15 /usr/lib/python3.8/runpy.py:127: 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 2025-03-21 21:30:15 warn(RuntimeWarning(msg)) 2025-03-21 21:30:15 2025-03-21 21:30:15,267 - modelscope - INFO - PyTorch version 1.12.0+cu113 Found. 2025-03-21 21:30:15 2025-03-21 21:30:15,268 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2025-03-21 21:30:15 2025-03-21 21:30:15,286 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 dc0b45bdeda6e159c86e315a4e3a0778 and a total number of 980 components indexed 2025-03-21 21:30:15 2025-03-21 21:30:15,666 - modelscope - INFO - Use user-specified model revision: v1.0.2 2025-03-21 21:30:16 I20250321 21:30:16.145222 92 funasr-wss-server.cpp:400] Set lm-dir : /workspace/models/damo/speech_ngram_lm_zh-cn-ai-wesp-fst 2025-03-21 21:30:16 I20250321 21:30:16.145248 92 funasr-wss-server.cpp:418] Download model: damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx from modelscope: 2025-03-21 21:30:17 /usr/lib/python3.8/runpy.py:127: 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 2025-03-21 21:30:17 warn(RuntimeWarning(msg)) 2025-03-21 21:30:17 2025-03-21 21:30:17,599 - modelscope - INFO - PyTorch version 1.12.0+cu113 Found. 2025-03-21 21:30:17 2025-03-21 21:30:17,599 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2025-03-21 21:30:17 2025-03-21 21:30:17,617 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 dc0b45bdeda6e159c86e315a4e3a0778 and a total number of 980 components indexed 2025-03-21 21:30:17 2025-03-21 21:30:17,964 - modelscope - INFO - Use user-specified model revision: v2.0.5 2025-03-21 21:30:18 I20250321 21:30:18.538980 92 funasr-wss-server.cpp:437] Set punc-dir : /workspace/models/damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx 2025-03-21 21:30:18 I20250321 21:30:18.539006 92 funasr-wss-server.cpp:466] hotword path: /workspace/FunASR/runtime/websocket/hotwords.txt 2025-03-21 21:30:18 I20250321 21:30:18.540194 92 util.cpp:1013] hotwords: 2025-03-21 21:30:18 I20250321 21:30:18.540664 92 util.cpp:1042] 阿里巴巴 : 20 2025-03-21 21:30:18 I20250321 21:30:18.540719 92 util.cpp:1042] 通义实验室 : 30 2025-03-21 21:30:18 I20250321 21:30:18.541776 92 funasr-wss-server.cpp:497] SSL is closed! 2025-03-21 21:30:18 I20250321 21:30:18.575505 92 fsmn-vad.cpp:58] Successfully load model from /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx/model_quant.onnx 2025-03-21 21:30:18 I20250321 21:30:18.604571 92 paraformer-torch.cpp:41] CUDA is available, running on GPU 2025-03-21 21:30:22 I20250321 21:30:22.146929 92 paraformer-torch.cpp:52] Successfully load model from /workspace/models/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model_blade.torchscript 2025-03-21 21:30:25 2025-03-21 21:30:25.202478: I external/org_tensorflow/tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:982] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node 2025-03-21 21:30:25 Your kernel may have been built without NUMA support. 2025-03-21 21:30:26 2025-03-21 21:30:26.416289: I external/org_tensorflow/tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:424] Loaded cuDNN version 8302 2025-03-21 21:30:18 Notice: ffmpeg is not installed. torchaudio is used to load audio 2025-03-21 21:30:18 If you want to use ffmpeg backend to load audio, please install it by: 2025-03-21 21:30:18 sudo apt install ffmpeg # ubuntu 2025-03-21 21:30:18 # brew install ffmpeg # mac 2025-03-21 21:30:18 transformer is not installed, please install it if you want to use related modules
就是没有出现 : listen on port:10095 这一行?
就是镜像问题,大家可以看这个https://github.com/GuijiAI/HeyGem.ai/issues/286