#7678 语音识别阶段出错[faster-whisper(内置)] list index out of range:Traceback (most recent call last): File

2409**1684 Posted at: 1 hour ago

语音识别阶段出错[faster-whisper(内置)] list index out of range:Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 160, in faster_whisper
File "videotrans\process\_stt_utils.py", line 290, in _resegment
IndexError: list index out of range

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 103, in process_task

File "videotrans\task\_stage_recogn.py", line 63, in recogn

File "videotrans\recognition\__init__.py", line 121, in run

File "videotrans\recognition\_base.py", line 99, in run

File "videotrans\recognition\_whisper.py", line 41, in _exec

File "videotrans\recognition\_whisper.py", line 138, 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 160, in faster_whisper
File "videotrans\process\_stt_utils.py", line 290, in _resegment
IndexError: list index out of range

self.cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: D:/zimu/shuchu/VID_20161003_163531.mp4,
输出结果保存到文件夹: D:/zimu/shuchu/VID_20161003_163531-mp4,
临时文件夹: D:/zimu/win-pyvideotrans-v4.14/tmp/30100/3e78b33e66
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:微软(免费),原始语言:简体中文,目标语言:英语, 已选 发送完整字幕
输出字幕格式: 单字幕


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:D:/zimu/win-pyvideotrans-v4.14

1 Replies

#1 DeepSeek reply at 1 hour ago

这是由于 faster-whisper 识别后调用内部重断句逻辑 _resegment 时,某段音频切分结果为空(列表索引越界)导致的崩溃,常见于音频开头/结尾存在极短或纯静音片段、或 VAD 切分产生了空的语音片段。

解决方案(按顺序尝试):

  1. 调整语音识别参数:进入 菜单 → 工具/选项 → 高级选项 → 语音识别参数

    • 将 最短语音持续(毫秒) 适当降低(如 1000)或提高(如 3500)
    • 将 静音分割持续(毫秒) 适当调大(如 800)
    • 修改后勾选 清理已生成 再重试
  2. 更换识别模型:将 faster-whisper 模型从 large-v3-turbo 换为 large-v3 或 medium 重试,排除特定模型在该音频上产出的空片段问题。

  3. 启用降噪或人声分离:在主界面点 设置更多参数,勾选 降噪 或 分离人声背景声,排除背景杂音造成的 VAD 切分异常。

  4. 直接重试:勾选 清理已生成,重新执行任务一次,部分偶发切分异常可自动恢复。

  5. 若仍持续报错:请将视频开头/结尾数秒裁剪掉后再试(纯静音或极短片段易触发该越界)。

如上述操作后仍报相同错误,请提供 D:/zimu/win-pyvideotrans-v4.14/logs/ 目录下最新的日志文件(复制底部约 30 行),以便进一步定位。

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