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

根据文档导出Libtorch-python模型失败 #1712

Closed wenjiwei closed 4 months ago

wenjiwei commented 5 months ago

question

按照https://github.com/alibaba-damo-academy/FunASR/tree/main/runtime/python/libtorch导出模型出错: python3.8 -m funasr.export.export_model --model-name damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch --export-dir ./export --type onnx --quantize True export model: damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch 2024-05-09 19:49:59,210 - modelscope - INFO - PyTorch version 2.1.2 Found. 2024-05-09 19:49:59,210 - modelscope - INFO - Loading ast index from /home/seulab/.cache/modelscope/ast_indexer 2024-05-09 19:49:59,225 - modelscope - INFO - Loading done! Current index file version is 1.14.0, with md5 fe14011699636f726de294adcc3826b8 and a total number of 976 components indexed 2024-05-09 19:50:00,213 - modelscope - WARNING - Model revision not specified, use revision: v2.0.4 Traceback (most recent call last): File "/home/seulab/miniconda3/envs/funsar/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/seulab/miniconda3/envs/funsar/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/seulab/miniconda3/envs/funsar/lib/python3.8/site-packages/funasr/export/export_model.py", line 298, in export_model.export(model_name) File "/home/seulab/miniconda3/envs/funsar/lib/python3.8/site-packages/funasr/export/export_model.py", line 191, in export mode = config_data['model']['model_config']['mode'] KeyError: 'model_config'

environment

lyblsgo commented 4 months ago

Pull the latest code from Git.