#4073 TaskCfgSTT(is_cuda=True, uuid='cbf28bc586', cache_folder='E:/ytrans/tmp/10640/cbf28bc586', target_dir='E:/ytrans/output/

202.150* Posted at: 2 hours ago 👁10

ASR Error [FunASR(Local)] Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 489, in paraformer
KeyError: 'sentence_info'

Traceback (most recent call last):
File "videotrans\task\job.py", line 106, in run
File "videotrans\task\_speech2text.py", line 153, in recogn
File "videotrans\recognition\__init__.py", line 243, in run
File "videotrans\recognition\_base.py", line 142, in run
File "videotrans\recognition\_funasr.py", line 68, in _exec
File "videotrans\configure\_base.py", line 290, in _new_process
RuntimeError: Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 489, in paraformer
KeyError: 'sentence_info'
TaskCfgSTT(is_cuda=True, uuid='cbf28bc586', cache_folder='E:/ytrans/tmp/10640/cbf28bc586', target_dir='E:/ytrans/output/recogn', source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code=None, target_sub='E:/ytrans/output/recogn/3.srt', target_wav=None, target_wav_output=None, name='E:/2023/personal/inspo2/CN Course/Kana/W5/3.m4a', noextname='3', basename='3.m4a', ext='m4a', dirname='E:/2023/personal/inspo2/CN Course/Kana/W5', shound_del_name=None, detect_language='zh-cn', recogn_type=3, model_name='paraformer-zh', shibie_audio='E:/ytrans/tmp/10640/cbf28bc586/3-1776236867.2993677.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=1, fix_punc=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.97
frozen:True
language:en
root_dir:E:/ytrans

1 Replies

The error KeyError: 'sentence_info' occurs when using the FunASR (local) speech recognition channel. This is typically caused by an issue with the model's output format or a mismatch between the expected and actual response structure from the FunASR model.

To resolve this, follow these steps:

  1. Switch to a Different ASR Channel: As a primary workaround, avoid using the FunASR (local) channel for now. Instead, select a more stable channel such as:

    • faster-whisper(local) with the large-v3 model (requires CUDA for speed).
    • Qwen-ASR(local) for Chinese content.
    • OpenAI Whisper API or other online services if you have API keys.
  2. Check and Update the Model: If you must use FunASR, ensure you have the correct and latest model files. The error suggests the model's output does not contain the expected 'sentence_info' key.

    • Go to Menu -> Tools/Options -> Advanced Options -> Speech Recognition Parameters.
    • Verify the model name is correct (e.g., paraformer-zh).
    • Try re-downloading the model. You may need to manually download it from the official ModelScope repository and place it in the correct models/ directory.
  3. Update pyVideoTrans: You are using version v3.97. This issue might have been addressed in a later release. Please update to the latest version (v3.99) from the official download page: https://pyvideotrans.com/downpackage. Always download the full package, extract it, and then apply any patch files.
  4. Review Logs for More Context: Examine the detailed log file in your E:/ytrans/logs/ directory for any preceding errors related to model loading or initialization, which might provide more clues.

If the problem persists after trying the above steps, please provide the bottom 30 lines of the latest log file from the logs/ folder for further analysis.

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource