#7176 list index out of range:Traceback (most recent call last): File

2602**4f38 Posted at: 1 hour ago

list index out of range:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 161, in faster_whisper
File "videotrans\process\_stt_utils.py", line 271, in _resegment
IndexError: list index out of range

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 70, in run
File "videotrans\task\_stage_recogn.py", line 65, in recogn
File "videotrans\recognition\__init__.py", line 228, in run
File "videotrans\recognition\_base.py", line 97, in run
File "videotrans\recognition\_whisper.py", line 41, in _exec
File "videotrans\recognition\_whisper.py", line 130, in _faster
File "videotrans\configure\base.py", line 264, in _new_process
videotrans.configure.excepts.VideoTransError: list index out of range:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 161, in faster_whisper
File "videotrans\process\_stt_utils.py", line 271, in _resegment
IndexError: list index out of range

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: F:/shucai/resource_20260911_130306.mp4,
输出结果保存到文件夹: F:/shucai/_video_out/resource_20260911_130306-mp4,
临时文件夹: F:/jianji/win-pyvideotrans-v4.12-0908/tmp/15424/16f5e9de64
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), distil-large-v3.5, 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:简体中文,目标语言:英语, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:WilliamMultilingual(Male/AU), 配音语言:英语, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 嵌入软字幕
代理地址:http://127.0.0.1:8899


=
system:Windows-10-10.0.26200-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:F:/jianji/win-pyvideotrans-v4.12-0908

1 Replies

#1 DeepSeek reply at 1 hour ago

这是语音识别阶段内部处理字幕分段时出现的索引越界崩溃(IndexError: list index out of range),发生在 faster-whisper 识别完成后的断句/重排环节。

可能原因与解决方向:

  1. 模型选择不当:你使用的是 distil-large-v3.5 模型,但发音语言选择了简体中文distil 系列(蒸馏版 Whisper)主要针对英语优化,对中文支持较差,容易在识别后产生异常空结果或格式异常的分段,从而触发断句逻辑中的索引越界。

    • 建议:将语音识别模型改为 large-v3-turbolarge-v3(对中文支持更好),重新执行。
  2. 音频本身问题:原始视频可能人声极短、全程静音、或背景噪声过大导致 VAD 切分出异常片段。可尝试勾选 设置更多参数 中的 降噪分离人声背景声 后再试。
  3. 临时文件残留:由于勾选了 清理已存在,理论上已清理旧缓存,但可不勾选该选项再试一次以排除缓存干扰。

建议操作顺序:

  1. 先将识别模型换为 large-v3-turbo,发音语言保持"简体中文",重新执行;
  2. 若仍报同样错误,勾选 降噪分离人声背景声 后再试;
  3. 若仍失败,请提供 logs/ 文件夹中对应日期的日志文件。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource