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

117.174**7 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\speech2text.py", line 100, 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
[SpeechToText]语音转录: self.out_format='srt',self.copysrt_rawvideo=False,self.spk_insert=False
[TaskCfgSTT]
原始输入文件名: E:/app/ReadyOrNotModTools/Fmod/Output/Exports/ReadyOrNot/Content/VO_PC/NarcosCivilianMale/[BARK]Arrested_0.ogg,
输出结果保存到文件夹: F:/app/win-pyvideotrans-v3.98-0410/output/recogn,
临时文件夹: F:/app/win-pyvideotrans/tmp/19512/a7aef4e501
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), tiny 断句方式:默认断句
发音语言:en
未选 降噪
代理地址:http://127.0.0.1:7890


=
system:Windows-10-10.0.28000-SP0
version:v4.14
frozen:True
language:zh
root_dir:F:/app/win-pyvideotrans

1 Replies

#1 DeepSeek reply at 1 hour ago

这是软件内部 _resegment(重新切分/合并排序)逻辑的边界处理Bug。

在 videotrans/process/_stt_utils.py 第290行,对识别结果列表按索引访问时越界,通常由极短音频、识别结果为空、或时间轴异常导致。

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

  1. 升级到最新版本:您当前 frozen:True 但残留文件显示 win-pyvideotrans-v3.98-0410,属旧版本残留。

    v4.14 已多次修复断句与合并算法Bug。

    请下载完整包重新解压覆盖,并删除 _internal 中所有 __pycache__ 文件夹。

  2. 避免对超短音频使用:您的输入是 [BARK]Arrested_0.ogg(游戏单句音效),时长可能不足1秒。

    faster-whisper 对极短音频易返回空结果或异常时间轴,从而导致切分越界。

    建议:

    • 合并多个短音频后再识别,或
    • 改用 openai-whisper(内置) 渠道试一次,确认是否为切分逻辑问题。

  3. 切换模型验证:在语音转录界面将 tiny 换为 base 或 small,重新运行。

    tiny 模型在当前极短音频上更容易产生异常的识别结果。

  4. 临时绕过:若仅需字幕、不需要自动切分,可尝试在 菜单-工具/选项-高级选项-语音识别参数 中调整 最长语音持续 与 静音分割持续,或先不做重新断句设置。

如果升级到 v4.14 并换用 base/small 模型、合并音频后仍复现,请提供 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