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

117.182**4 Posted at: 2 hours ago

list index out of range:Traceback (most recent call last):
File "videotrans\process\stt_pipe.py", line 61, in pipe_asr
File "D:\win-pyvideotrans-v4.16\_internal\transformers\pipelines\automatic_speech_recognition.py", line 247, in call

return super().__call__(inputs, **kwargs)

File "D:\win-pyvideotrans-v4.16\_internal\transformers\pipelines\base.py", line 1215, in call

if is_valid_message(inputs[0]):

IndexError: list index out of range

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 148, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_huggingface.py", line 34, in _exec
File "videotrans\recognition\_huggingface.py", line 70, in _pipe_asr
File "videotrans\configure\base.py", line 277, in _new_process
videotrans.configure.excepts.VideoTransError: list index out of range:Traceback (most recent call last):
File "videotrans\process\stt_pipe.py", line 61, in pipe_asr
File "D:\win-pyvideotrans-v4.16\_internal\transformers\pipelines\automatic_speech_recognition.py", line 247, in call

return super().__call__(inputs, **kwargs)

File "D:\win-pyvideotrans-v4.16\_internal\transformers\pipelines\base.py", line 1215, in call

if is_valid_message(inputs[0]):

IndexError: list index out of range

trk=[TransCreate]: uuid='3483c5c2d1', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/Download/video_261031_213328.mp4,
输出结果保存到文件夹: D:/Download/_video_out/video_261031_213328-mp4,
临时文件夹: D:/win-pyvideotrans-v4.16/tmp/12564/3483c5c2d1
已选 清理已存在
已启用CUDA加速
语音识别:Huggingface_ASR(内置), kotoba-tech/kotoba-whisper-v2.0, 发音语言: 日语, LLM纠错,
翻译渠道:Google(免费),原始语言:日语,目标语言:简体中文, 已选 发送完整字幕, settings.get('trans_thread')=10, settings.get('aitrans_thread')=40
未选 配音角色,不进行配音
字幕: 嵌入软字幕(双) 目标语言在上双字幕, precent=4, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=True, is_copy_video=False, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=True
video_duration_ms=89874


=
system:Windows-10-10.0.26300-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.16

1 Replies

#1 DeepSeek reply at 2 hours ago

报错发生在 Huggingface_ASR(内置) 渠道:transformers 的自动语音识别 pipeline 收到的音频输入是空列表(inputs[0] 索引越界),也就是送进 kotoba-whisper-v2.0 的某个音频切片为空或无效,或该模型的文件/依赖不完整,导致 pipeline 无法正常构造输入。

按以下顺序排查:

  1. 先换渠道验证是否为该渠道专属问题
    把语音识别改为 openai-whisper(内置) 或 faster-whisper(内置) + large-v3(日语推荐),发音语言仍选日语,重新执行。若换渠道正常,则问题出在 Huggingface_ASR + kotoba-whisper-v2.0 这一组合上。
  2. 检查模型是否完整下载
    查看目录 软件目录/models/models--kotoba-tech--kotoba-whisper-v2.0(软件目录指 sp.exe 所在文件夹)。若文件缺失或大小异常,删除该文件夹后重新下载;也可手动到 https://huggingface.co/kotoba-tech/kotoba-whisper-v2.0/tree/main 下载全部文件并按原名放入该目录。
  3. 确认补丁包是完整覆盖
    日志显示版本为 v4.17,但程序目录是 D:\win-pyvideotrans-v4.16。若升级时只覆盖了 sp.exe,而未覆盖 _internal 和 videotrans 文件夹,会出现 transformers 版本与代码不匹配的异常。请把补丁包内所有文件和文件夹覆盖到旧版本,并在 _internal 文件夹中搜索 __pycache__,删除搜索到的全部内容后重启软件。
  4. 排除空音频切片
    在 菜单 → 工具/选项 → 高级选项 → 语音识别参数 适当调大 静音分割持续毫秒、调小 最长语音持续(秒) 的极端值;也可在 设置更多参数 中勾选 降噪 或 分离人声背景声 后再重试。
  5. 若完成上述步骤仍报同样错误,请提供软件安装目录下 logs/ 文件夹中最新日志的底部约 30 行(含 Huggingface_ASR 相关完整堆栈),以便进一步判断是模型文件损坏还是 pipeline 参数兼容问题。

请查阅相关文档:

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