#5349 TaskCfgVTT(uuid='a1f77eb0e1', name='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/video/2-2D Character Movement & Animatio

183.14* 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 36, in _exec

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

File "videotrans\configure\base.py", line 253, 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='a1f77eb0e1', name='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/video/2-2D Character Movement & Animation/1-Create FlipBook.mp4', dirname='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/video/2-2D Character Movement & Animation', noextname='1-Create FlipBook', basename='1-Create FlipBook.mp4', ext='mp4', target_dir='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/_video_out/video/1-Create FlipBook-mp4', cache_folder='K:/MACHI/win-pyvideotrans-v4.01-0602/tmp/40224/a1f77eb0e1', is_cuda=True, source_language='英语', source_language_code='en', source_sub='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/_video_out/video/1-Create FlipBook-mp4/en.srt', source_wav='K:/MACHI/win-pyvideotrans-v4.01-0602/tmp/40224/a1f77eb0e1/en.wav', source_wav_output='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/_video_out/video/1-Create FlipBook-mp4/en.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/_video_out/video/1-Create FlipBook-mp4/zh-cn.srt', target_wav='K:/MACHI/win-pyvideotrans-v4.01-0602/tmp/40224/a1f77eb0e1/target.wav', target_wav_output='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/_video_out/video/1-Create FlipBook-mp4/zh-cn.m4a', translate_type=4, tts_type=9, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Sound_005_90.m4a', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=1, fix_punc=True, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='K:/MACHI/# 0DayDown/教程_Tutorials/Unreal/023/_video_out/video/1-Create FlipBook-mp4/1-Create FlipBook.mp4', novoice_mp4='K:/MACHI/win-pyvideotrans-v4.01-0602/tmp/40224/a1f77eb0e1/novoice.mp4', is_separate=True, embed_bgm=True, instrument='K:/MACHI/win-pyvideotrans-v4.01-0602/tmp/40224/a1f77eb0e1/instrument.wav', vocal='K:/MACHI/win-pyvideotrans-v4.01-0602/tmp/40224/a1f77eb0e1/vocal.wav', clear_cache=False, background_music='', subtitle_type=3, only_out_mp4=False, recogn2pass=False, output_srt=2, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8)


=
system:Windows-10-10.0.19045-SP0
version:v4.01
frozen:True
language:zh
root_dir:K:/MACHI/win-pyvideotrans-v4.01-0602

1 Replies

该错误是由于 faster-whisper 在语音识别时遇到了负的时间戳,通常由音频文件异常VAD(语音活动检测)参数过激导致,结合您的日志中路径包含大量空格和特殊字符,很可能是 FFmpeg 解析路径/音频切片被截断或损坏 引发。

解决方案

  1. 简化文件路径与名称
    将视频文件移动到磁盘根目录的纯英文无空格目录下,例如 D:\video\1-Create-FlipBook.mp4,并删除文件名中的 #&、空格等特殊符号。
  2. 暂时关闭人声分离
    在主界面点击“设置更多参数”,取消勾选“分离人声背景声”,排除该步骤带来的额外切片错误。
  3. 调整 VAD 参数
    进入 菜单 -> 工具 -> 高级选项 -> 语音识别参数,将 非语音阈值 适当增大(如从 0.5 改为 0.6),或将 语音阈值 稍调小(如从 0.5 改为 0.4),并确保 Whisper预分割音频 取消勾选
  4. 更换更小的模型测试
    先选择 smallmedium 模型运行同一视频,若成功则说明问题与模型或显存相关。

若以上仍无效,请提供 logs/ 目录下最新的完整日志文件以便进一步定位。

请查阅相关文档:

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

Similar issues already exist