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中文离线文件转写服务部署:asr model init finished. listen on port:10095 #1558

Closed Jacoo520 closed 4 months ago

Jacoo520 commented 6 months ago

windows11 pytorch:2.2.1+cu118 python:3.8 使用pip安装funasr:1.0.19版本 使用pip安装modelscope:1.13.2版本 然后按着FunASR社区软件包Windows版本流程git下载以下文件:

 mkdir -p D:/funasr-runtime-resources/models && cd D:/funasr-runtime-resources/models;

 git clone https://www.modelscope.cn/damo/speech_fsmn_vad_zh-cn-16k-common-onnx.git;

 git clone https://www.modelscope.cn/damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx.git;

 git clone https://www.modelscope.cn/damo/speech_ngram_lm_zh-cn-ai-wesp-fst.git;

 git clone https://www.modelscope.cn/damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx.git;

 git clone https://www.modelscope.cn/thuduj12/fst_itn_zh.git

运行的是Git Bash在项目目录(funasr-runtime-win-cpu-x64-v0.2.0)启动服务端: ./funasr-wss-server.exe --vad-dir D:/funasr-runtime-resources/models/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir D:/funasr-runtime-resources/models/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx --lm-dir D:/funasr-runtime-resources/models/speech_ngram_lm_zh-cn-ai-wesp-fst --punc-dir D:/funasr-runtime-resources/models/punc_ct-transformer_cn-en-common-vocab471067-large-onnx --itn-dir D:/funasr-runtime-resources/models/fst_itn_zh --keyfile 0 --certfile 0 运行过程:

I20240328 15:00:46.258157 22652 funasr-wss-server.cpp:25] model-dir : D:/funasr-runtime-resources/models/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] quantize : true
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] vad-dir : D:/funasr-runtime-resources/models/speech_fsmn_vad_zh-cn-16k-common-onnx
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] vad-quant : true
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] punc-dir : D:/funasr-runtime-resources/models/punc_ct-transformer_cn-en-common-vocab471067-large-onnx
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] punc-quant : true
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] itn-dir : D:/funasr-runtime-resources/models/fst_itn_zh
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] lm-dir : D:/funasr-runtime-resources/models/speech_ngram_lm_zh-cn-ai-wesp-fst
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] hotword : /workspace/resources/hotwords.txt
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] model-revision : v1.2.1
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] vad-revision : v1.2.0
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] punc-revision : v1.1.7
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] itn-revision : v1.0.1
I20240328 15:00:46.259487 22652 funasr-wss-server.cpp:25] lm-revision : v1.0.2
D:\anaconda3\envs\funasr\python.exe: No module named funasr.utils.runtime_sdk_download_tool
I20240328 15:00:51.005175 22652 funasr-wss-server.cpp:210] Failed to download model from modelscope. If you set local vad model path, you can ignore the errors.
I20240328 15:00:51.005175 22652 funasr-wss-server.cpp:222] Set vad-dir : D:/funasr-runtime-resources/models/speech_fsmn_vad_zh-cn-16k-common-onnx
D:\anaconda3\envs\funasr\python.exe: No module named funasr.utils.runtime_sdk_download_tool
I20240328 15:00:55.303602 22652 funasr-wss-server.cpp:264] Failed to download model from modelscope. If you set local asr model path, you can ignore the errors.
I20240328 15:00:55.303602 22652 funasr-wss-server.cpp:276] Set model-dir : D:/funasr-runtime-resources/models/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx
D:\anaconda3\envs\funasr\python.exe: No module named funasr.utils.runtime_sdk_download_tool
I20240328 15:00:59.526976 22652 funasr-wss-server.cpp:309] Failed to download model from modelscope. If you set local itn model path, you can ignore the errors.
I20240328 15:00:59.528059 22652 funasr-wss-server.cpp:318] Set itn-dir : D:/funasr-runtime-resources/models/fst_itn_zh
D:\anaconda3\envs\funasr\python.exe: No module named funasr.utils.runtime_sdk_download_tool
I20240328 15:01:03.723992 22652 funasr-wss-server.cpp:351] Failed to download model from modelscope. If you set local lm model path, you can ignore the errors.
I20240328 15:01:03.724651 22652 funasr-wss-server.cpp:360] Set lm-dir : D:/funasr-runtime-resources/models/speech_ngram_lm_zh-cn-ai-wesp-fst
D:\anaconda3\envs\funasr\python.exe: No module named funasr.utils.runtime_sdk_download_tool
I20240328 15:01:07.902748 22652 funasr-wss-server.cpp:385] Failed to download model from modelscope. If you set local punc model path, you can ignore the errors.
I20240328 15:01:07.902748 22652 funasr-wss-server.cpp:397] Set punc-dir : D:/funasr-runtime-resources/models/punc_ct-transformer_cn-en-common-vocab471067-large-onnx
I20240328 15:01:07.902748 22652 funasr-wss-server.cpp:426] hotword path: /workspace/resources/hotwords.txt
E20240328 15:01:07.903746 22652 util.cpp:985] Unable to open hotwords file: /workspace/resources/hotwords.txt. If you have not set hotwords, please ignore this message.
I20240328 15:01:07.903746 22652 funasr-wss-server.cpp:457] SSL is closed!
I20240328 15:01:07.958819 22652 fsmn-vad.cpp:58] Successfully load model from D:/funasr-runtime-resources/models/speech_fsmn_vad_zh-cn-16k-common-onnx\model_quant.onnx
I20240328 15:01:09.566799 22652 paraformer.cpp:42] Successfully load model from D:/funasr-runtime-resources/models/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx\model_quant.onnx
I20240328 15:01:17.308804 22652 paraformer.cpp:197] Successfully load lm file D:/funasr-runtime-resources/models/speech_ngram_lm_zh-cn-ai-wesp-fst\TLG.fst
I20240328 15:01:18.853030 22652 ct-transformer.cpp:21] Successfully load model from D:/funasr-runtime-resources/models/punc_ct-transformer_cn-en-common-vocab471067-large-onnx\model_quant.onnx
I20240328 15:01:22.349561 22652 tokenizer.cpp:40] Successfully load file from D:/funasr-runtime-resources/models/punc_ct-transformer_cn-en-common-vocab471067-large-onnx\jieba.c.dict, D:/funasr-runtime-resources/models/punc_ct-transformer_cn-en-common-vocab471067-large-onnx\jieba_usr_dict
I20240328 15:01:22.371562 22652 tokenizer.cpp:48] Successfully load model from D:/funasr-runtime-resources/models/punc_ct-transformer_cn-en-common-vocab471067-large-onnx\jieba.hmm
I20240328 15:01:22.377418 22652 itn-processor.cpp:33] Successfully load model from D:/funasr-runtime-resources/models/fst_itn_zh\zh_itn_tagger.fst
I20240328 15:01:22.379415 22652 itn-processor.cpp:35] Successfully load model from D:/funasr-runtime-resources/models/fst_itn_zh\zh_itn_verbalizer.fst
I20240328 15:01:22.379415 22652 websocket-server.cpp:409] model successfully inited
I20240328 15:01:22.379415 22652 websocket-server.cpp:411] initAsr run check_and_clean_connection
I20240328 15:01:22.380343 22652 websocket-server.cpp:414] initAsr run check_and_clean_connection finished
I20240328 15:01:22.380343 22652 funasr-wss-server.cpp:473] decoder-thread-num: 8
I20240328 15:01:22.380914 22652 funasr-wss-server.cpp:474] io-thread-num: 2
I20240328 15:01:22.380914 22652 funasr-wss-server.cpp:475] model-thread-num: 1
I20240328 15:01:22.380914 22652 funasr-wss-server.cpp:476] asr model init finished. listen on port:10095

运行到这不报错也不结束,请大师指点我的安装流程是否有问题?还是别的问题?

lyblsgo commented 6 months ago

ref to https://www.modelscope.cn/models/iic/funasr-runtime-win-cpu-x64/summary