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
7.11k stars 754 forks source link

model_blade.torchscript do not exists #1958

Open dwyane20 opened 4 months ago

dwyane20 commented 4 months ago

使用docker部署离线gpu funasr,使用原始的paraformer-zh后会自动下载相应的模型,生成model_blade.torchscript文件,但是我换成SenseVoiceSmall后不下载,也不生成model_blade.torchscript文件,报错 /workspace/models/damo/SenseVoiceSmall/model_blade.torchscript do not exists。求指导下怎么生成这个文件?

LauraGPT commented 4 months ago

We are working on it now.

MrRohwei commented 3 months ago

@LauraGPT 基于docker部署的FunASR-gpu服务端,现在是换不了模型吗?

nohup bash run_server.sh \
  --download-model-dir /workspace/models \
  --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx \
  --model-dir paraformer-zh  \
  --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-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 &

上面将--model-dir换成模型仓库中的任意模型都会报错: image

root@a06c39f0d9d9:/workspace/FunASR/runtime# tail -f log.txt nohup: ignoring input I20240801 05:48:38.715528 1596 funasr-wss-server.cpp:25] model-dir : paraformer-zh I20240801 05:48:38.715587 1596 funasr-wss-server.cpp:25] quantize : true I20240801 05:48:38.715600 1596 funasr-wss-server.cpp:25] bladedisc : true I20240801 05:48:38.715607 1596 funasr-wss-server.cpp:25] vad-dir : damo/speech_fsmn_vad_zh-cn-16k-common-onnx I20240801 05:48:38.715615 1596 funasr-wss-server.cpp:25] vad-quant : true I20240801 05:48:38.715623 1596 funasr-wss-server.cpp:25] punc-dir : damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx I20240801 05:48:38.715631 1596 funasr-wss-server.cpp:25] punc-quant : true I20240801 05:48:38.715639 1596 funasr-wss-server.cpp:25] itn-dir : thuduj12/fst_itn_zh I20240801 05:48:38.715646 1596 funasr-wss-server.cpp:25] lm-dir : damo/speech_ngram_lm_zh-cn-ai-wesp-fst I20240801 05:48:38.715654 1596 funasr-wss-server.cpp:25] hotword : /workspace/models/hotwords.txt I20240801 05:48:38.715662 1596 funasr-wss-server.cpp:25] model-revision : v2.0.4 I20240801 05:48:38.715670 1596 funasr-wss-server.cpp:25] vad-revision : v2.0.6 I20240801 05:48:38.715677 1596 funasr-wss-server.cpp:25] punc-revision : v2.0.4 I20240801 05:48:38.715685 1596 funasr-wss-server.cpp:25] itn-revision : v1.0.1 I20240801 05:48:38.715693 1596 funasr-wss-server.cpp:25] lm-revision : v1.0.2 I20240801 05:48:38.715708 1596 funasr-wss-server.cpp:216] Download model: damo/speech_fsmn_vad_zh-cn-16k-common-onnx from modelscope: /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 warn(RuntimeWarning(msg)) 2024-08-01 05:48:43,590 - modelscope - INFO - PyTorch version 1.12.0+cu113 Found. 2024-08-01 05:48:43,591 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2024-08-01 05:48:43,678 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 8d8b2ffe511d3550d49ab89db08cc1d7 and a total number of 980 components indexed 2024-08-01 05:48:44,125 - modelscope - INFO - Use user-specified model revision: v2.0.6 Notice: ffmpeg is not installed. torchaudio is used to load audio If you want to use ffmpeg backend to load audio, please install it by: sudo apt install ffmpeg # ubuntu

brew install ffmpeg # mac

If you want use mossformer, lease install rotary_embedding_torch by: pip install -U rotary_embedding_torch If you want use mossformer, lease install rotary_embedding_torch by: pip install -U rotary_embedding_torch If you want use mossformer, lease install rotary_embedding_torch by: pip install -U rotary_embedding_torch If you want use mossformer, lease install rotary_embedding_torch by: pip install -U rotary_embedding_torch transformer is not installed, please install it if you want to use related modules I20240801 05:48:45.006976 1596 funasr-wss-server.cpp:235] Set vad-dir : /workspace/models/damo/speech_fsmn_vad_zh-cn-16k-common-onnx I20240801 05:48:45.007073 1596 funasr-wss-server.cpp:278] Download model: paraformer-zh from modelscope: /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 warn(RuntimeWarning(msg)) 2024-08-01 05:48:49,879 - modelscope - INFO - PyTorch version 1.12.0+cu113 Found. 2024-08-01 05:48:49,879 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer 2024-08-01 05:48:49,965 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 8d8b2ffe511d3550d49ab89db08cc1d7 and a total number of 980 components indexed 2024-08-01 05:48:50,260 - modelscope - ERROR - The request model: paraformer-zh does not exist! Traceback (most recent call last): File "/workspace/FunASR/funasr/download/runtime_sdk_download_tool.py", line 28, in main model_dir = snapshot_download( File "/usr/local/lib/python3.8/dist-packages/modelscope/hub/snapshot_download.py", line 94, in snapshot_download revision_detail = _api.get_valid_revision_detail( File "/usr/local/lib/python3.8/dist-packages/modelscope/hub/api.py", line 499, in get_valid_revision_detail all_branches_detail, all_tags_detail = self.get_model_branches_and_tags_details( File "/usr/local/lib/python3.8/dist-packages/modelscope/hub/api.py", line 579, in get_model_branches_and_tags_details handle_http_response(r, logger, cookies, model_id) File "/usr/local/lib/python3.8/dist-packages/modelscope/hub/errors.py", line 117, in handle_http_response raise HTTPError(http_error_msg, response=response) requests.exceptions.HTTPError: The request model: paraformer-zh does not exist!

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/workspace/FunASR/funasr/download/runtime_sdk_download_tool.py", line 58, in main() File "/workspace/FunASR/funasr/download/runtime_sdk_download_tool.py", line 33, in main raise "model_dir must be model_name in modelscope or local path downloaded from modelscope, but is {}".format( TypeError: exceptions must derive from BaseException Notice: ffmpeg is not installed. torchaudio is used to load audio If you want to use ffmpeg backend to load audio, please install it by: sudo apt install ffmpeg # ubuntu

brew install ffmpeg # mac

If you want use mossformer, lease install rotary_embedding_torch by: pip install -U rotary_embedding_torch If you want use mossformer, lease install rotary_embedding_torch by: pip install -U rotary_embedding_torch If you want use mossformer, lease install rotary_embedding_torch by: pip install -U rotary_embedding_torch If you want use mossformer, lease install rotary_embedding_torch by: pip install -U rotary_embedding_torch transformer is not installed, please install it if you want to use related modules I20240801 05:48:50.920754 1596 funasr-wss-server.cpp:297] Failed to download model from modelscope. If you set local asr model path, you can ignore the errors. E20240801 05:48:50.920842 1596 funasr-wss-server.cpp:301] /workspace/models/paraformer-zh/model_blade.torchscript do not exists.

2721031254a commented 2 months ago

现在修复了吗

ws02589111 commented 2 months ago

Same issue

HolyFishhh commented 2 months ago

一样的问题

sansiny commented 2 months ago

解决了吗

lyblsgo commented 2 months ago

docker GPU版本只支持部署页面的模型,暂不支持Sensevoice https://github.com/modelscope/FunASR/blob/main/runtime/docs/SDK_advanced_guide_offline_gpu_zh.md