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

175.42**4 Posted at: 1 hour ago

语音识别阶段出错[openai-whisper(内置)] list index out of range:Traceback (most recent call last):
File "videotrans\process\stt_openai.py", line 98, in openai_whisper
File "videotrans\process\_stt_utils.py", line 189, 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 102, 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 39, in _exec

File "videotrans\recognition\_whisper.py", line 87, in _openai

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_openai.py", line 98, in openai_whisper
File "videotrans\process\_stt_utils.py", line 189, in _resegment
IndexError: list index out of range

self.cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: F:/影视/小早川/TKD-29 旅馆的老板娘/TKD-029.mp4,
输出结果保存到文件夹: F:/影视/小早川/TKD-29 旅馆的老板娘/_video_out/TKD-029-mp4,
临时文件夹: E:/pyvideotrans/tmp/13712/a7b2a5f5f0
已选 清理已存在
未启用CUDA加速
未选 降噪
已选 删除所有标点符号
语音识别:openai-whisper(内置), large-v3-turbo, 发音语言: 日语, 断句方式:默认断句
翻译渠道:Hy-MT2-1.8B(内置),原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
输出字幕格式: 单字幕


=
system:Windows-10-10.0.26200-SP0
version:v4.13
frozen:True
language:zh_CN
root_dir:E:/pyvideotrans

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:这是 openai-whisper 识别后的重新断句(_resegment)阶段出现的内部索引越界错误,通常由该段音频识别结果异常(如空结果、时间轴异常、重复文本)触发。

建议按以下顺序排查:

  1. 改用默认推荐的识别渠道:将语音识别渠道从 openai-whisper(内置) 改为 faster-whisper(内置),模型保持 large-v3-turbo,重新执行。

    这是当前默认推荐渠道,稳定性更好。

  2. 勾选“清理已生成”后重试:你现在已选该选项,确保重试时旧的错误中间产物被清空。

  3. 检查发音语言设置:你选择的是“日语”,请确认视频人声确实为日语。

    若不确定,可单独使用左侧“语音转录”功能,并将发音语言选为“自动检测”先验证识别是否正常。

  4. 下载完整模型:若 large-v3-turbo 模型下载不完整也会导致识别结果异常。

    可删除 E:/pyvideotrans/models/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo(若使用 openai-whisper 则为 models 下对应的 .pt 文件)后重新下载,或参考手动下载地址重新获取。

  5. 分离人声背景声:在“设置更多参数”中勾选“分离人声背景声”,可提升识别准确度,降低异常结果概率。

若更换为 faster-whisper 后仍在同一步报错,请提供最新的完整日志以便进一步分析。

请查阅相关文档:

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