#4506 TaskCfgSTT(is_cuda=True, uuid='702e5eac7e', cache_folder='C:/Users/user/Documents/WhisperJAV/output/ja.whisperjav/win-py

183.179* Posted at: 1 hour ago 👁7

语音识别阶段出错 [Deepgram.com] 处理列表或序列时索引越界:list index out of range
Traceback (most recent call last):
File "videotrans\recognition\_base.py", line 143, in run
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 105, in run
File "videotrans\task\_speech2text.py", line 191, in recogn
File "videotrans\recognition\__init__.py", line 265, in run
File "videotrans\recognition\_base.py", line 180, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\recognition\_deepgram.py", line 98, in _exec
File "deepgram_captions\srt.py", line 19, in srt
IndexError: list index out of range
TaskCfgSTT(is_cuda=True, uuid='702e5eac7e', cache_folder='C:/Users/user/Documents/WhisperJAV/output/ja.whisperjav/win-pyvideotrans-v3.99-0508/tmp/56756/702e5eac7e', target_dir='C:/Users/user/Documents/WhisperJAV/output/ja.whisperjav/win-pyvideotrans-v3.99-0508/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='C:/Users/user/Documents/WhisperJAV/output/ja.whisperjav/win-pyvideotrans-v3.99-0508/output/recogn/[email protected]', target_wav=None, target_wav_output=None, name='F:/qb bt3/WAV/pyvideotrans test/[email protected]3', noextname='hhd800.com@FC2-PPV-3076199', basename='[email protected]3', ext='mp3', dirname='F:/qb bt3/WAV/pyvideotrans test', shound_del_name=None, detect_language='ja', recogn_type=10, model_name='nova-3', shibie_audio='C:/Users/user/Documents/WhisperJAV/output/ja.whisperjav/win-pyvideotrans-v3.99-0508/tmp/56756/702e5eac7e/[email protected]', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.99
frozen:True
language:zh
root_dir:C:/Users/user/Documents/WhisperJAV/output/ja.whisperjav/win-pyvideotrans-v3.99-0508

1 Replies

该错误是由于 Deepgram API 返回的响应格式异常,导致在转换为 SRT 字幕时索引越界。

解决方案:

  1. 检查 Deepgram API 密钥是否有效且配额充足。
  2. 尝试先用其他渠道(如 faster-whisper)识别同一音频,以确认音频文件本身无问题。
  3. 如果音频正常,请升级 pyVideoTrans 至最新版(v3.99),或更换其他语音识别渠道。

请查阅相关文档:

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