lifeiteng / OmniSenseVoice

Omni SenseVoice: High-Speed Speech Recognition with words timestamps 🗣️🎯
Apache License 2.0
726 stars 29 forks source link

AttributeError: 'SenseVoiceSmall' object has no attribute 'export' #3

Closed wwfcnu closed 1 week ago

wwfcnu commented 1 month ago

.onnx does not exist, begin to export onnx funasr version: 1.1.6. Check update of funasr, and it would cost few times. You may disable it by setdisable_update=Truein AutoModel You are using the latest version of funasr-1.1.6 Traceback (most recent call last): File "/home/wangweifei/repository/wair/asr_project/utils/infer_omnisensevoice.py", line 10, in <module> model = SenseVoiceSmall(model_dir, batch_size=10, quantize=False, device_id=1) File "/home/wangweifei/anaconda3/envs/whisper_A800/lib/python3.9/site-packages/funasr_onnx/sensevoice_bin.py", line 71, in __init__ model_dir = model.export(type="onnx", quantize=quantize, **kwargs) File "/home/wangweifei/anaconda3/envs/whisper_A800/lib/python3.9/site-packages/funasr/auto/auto_model.py", line 623, in export export_dir = export_utils.export(model=model, data_in=data_list, **kwargs) File "/home/wangweifei/anaconda3/envs/whisper_A800/lib/python3.9/site-packages/funasr/utils/export_utils.py", line 9, in export model_scripts = model.export(**kwargs) File "/home/wangweifei/anaconda3/envs/whisper_A800/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1269, in __getattr__ raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'SenseVoiceSmall' object has no attribute 'export'

lifeiteng commented 1 week ago

Thank you, solved in https://github.com/lifeiteng/OmniSenseVoice/commit/8eb2b0b3bd115f501eb8d09bb6fcaf4c5f8b7e0f