#5290 TaskCfgVTT(uuid='f1c083fb4e', name='D:/视频制作/x/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24).mp4',

2603:c024* Posted at: 2 days ago

语音识别阶段出错[faster-whisper(本地内置)] non-negative timestamp expected:Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 239, 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\job.py", line 35, in run

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

File "videotrans\task\trans_create.py", line 322, in recogn

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

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

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

File "videotrans\recognition\_whisper.py", line 120, in _faster

File "videotrans\configure\base.py", line 258, in _new_process

videotrans.configure.excepts.VideoTransError: non-negative timestamp expected:Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 239, 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
TaskCfgVTT(uuid='f1c083fb4e', name='D:/视频制作/x/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24).mp4', dirname='D:/视频制作/x', noextname='4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24)', basename='4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24).mp4', ext='mp4', target_dir='D:/视频制作/_video_out/x/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24)-mp4', cache_folder='D:/Ruanjian-m/win-pyvideotrans-v4.01-0602/tmp/6048/f1c083fb4e', is_cuda=True, source_language='英语', source_language_code='en', source_sub='D:/视频制作/_video_out/x/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24)-mp4/en.srt', source_wav='D:/Ruanjian-m/win-pyvideotrans-v4.01-0602/tmp/6048/f1c083fb4e/en.wav', source_wav_output='D:/视频制作/_video_out/x/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24)-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='D:/视频制作/_video_out/x/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24)-mp4/zh-cn.srt', target_wav='D:/Ruanjian-m/win-pyvideotrans-v4.01-0602/tmp/6048/f1c083fb4e/target.wav', target_wav_output='D:/视频制作/_video_out/x/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24)-mp4/zh-cn.m4a', translate_type=4, tts_type=2, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='clone', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='large-v3', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=0, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='D:/视频制作/_video_out/x/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24)-mp4/4 Best Sex Positions for Female Orgasms, Based on Science-(1080p24).mp4', novoice_mp4='D:/Ruanjian-m/win-pyvideotrans-v4.01-0602/tmp/6048/f1c083fb4e/novoice.mp4', is_separate=True, embed_bgm=True, instrument='D:/Ruanjian-m/win-pyvideotrans-v4.01-0602/tmp/6048/f1c083fb4e/instrument.wav', vocal='D:/Ruanjian-m/win-pyvideotrans-v4.01-0602/tmp/6048/f1c083fb4e/vocal.wav', clear_cache=True, background_music='', subtitle_type=1, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8)


=
system:Windows-10-10.0.26200-SP0
version:v4.02
frozen:True
language:zh
root_dir:D:/Ruanjian-m/win-pyvideotrans-v4.01-0602

1 Replies

该错误 non-negative timestamp expected 是由音频处理时出现负时间戳导致,通常出现在 faster-whisper 模型处理异常音频片段或 VAD 切割不合逻辑时。问题可能源于:

  1. 临时文件冲突:之前的处理缓存未清理干净。
  2. 视频文件路径过长或含空格/特殊符号(你的路径有空格但不算严重)。
  3. VAD 参数设置不当:最短语音持续毫秒值过小或过大。
  4. 软件版本缺陷:v4.01 中偶尔会出现此问题,v4.02 已修复。

解决方案

  1. 清理临时缓存
    删除 D:/Ruanjian-m/win-pyvideotrans-v4.01-0602/tmp/ 目录下的全部内容,重新启动软件再试。
  2. 关闭“分离人声背景声”
    在“设置更多参数”中取消勾选“分离人声背景声”,因为该过程可能产生不标准的音频导致识别失败。
  3. 更新到最新版
    下载 v4.02 完整包覆盖安装(下载地址),该版本对 VAD 异常处理做了优化。
  4. 调整 VAD 参数
    如果问题依旧,进入“菜单 → 工具 → 高级选项 → 语音识别参数”,将“最短语音持续毫秒”设为 3000(3秒),并确保“合并过短字幕到邻近”已勾选。

参考文档

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. Dondate: ko-fi.com/jianchang512

Related resource