#4888 Traceback (most recent call last): File "videotrans\process\stt_fun.py", line 407, in faster_whisper File "faster_whis

2409:8a55* Posted at: 1 hour ago

Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 407, in faster_whisper
File "faster_whisper\transcribe.py", line 460, in transcribe
File "faster_whisper\utils.py", line 123, in format_timestamp
AssertionError: non-negative timestamp expected

Traceback (most recent call last):
File "videotrans\task\_only_one.py", line 44, in run
File "videotrans\task\trans_create.py", line 380, in recogn
File "videotrans\recognition\__init__.py", line 293, in run
File "videotrans\recognition\_base.py", line 143, in run
File "videotrans\recognition\_overall.py", line 33, in _exec
File "videotrans\recognition\_overall.py", line 105, in _faster
File "videotrans\configure\_base.py", line 289, in _new_process
RuntimeError: Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 407, in faster_whisper
File "faster_whisper\transcribe.py", line 460, in transcribe
File "faster_whisper\utils.py", line 123, in format_timestamp
AssertionError: non-negative timestamp expected

1 Replies

AssertionError: non-negative timestamp expected 是由于 Whisper 模型接收到包含负数时间戳的音频片段所致,通常由 VAD 分段参数过于激进或音频过于零碎引发。

解决方法(按优先级尝试):

  1. 调整 VAD 参数:在 设置更多参数语音识别参数 中:

    • 最短语音持续毫秒 设为 1000(避免极短片段)
    • 静音分割持续毫秒 设为 300~500(降低过度分割)
    • 最长语音持续秒数 设为 6~10
  2. 禁用预分割:进入 菜单—工具—高级选项—语音识别参数,取消勾选 Whisper预分割音频?
  3. 更换模型:若仍报错,尝试改用 openai-whisper(本地)faster-whispersmall 模型。
  4. 降噪预处理:在主界面勾选 降噪,减少音频中的毛刺噪声。

如果以上步骤无法解决,请提供 logs/ 目录下最新日志中报错前后约 30 行内容,以便进一步分析。

请查阅相关文档:

Post Your Reply
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.

Related resource

Similar issues already exist