#4492 TaskCfgSTT(is_cuda=True, uuid='abaad39e97', cache_folder='J:/软件/win-pyvideotrans-v3.99-0508/tmp/7516/abaad39e97', target

2409:8a5c* Posted at: 1 hour ago 👁8

语音识别阶段出错 [faster-whisper(本地)] Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 489, in faster_whisper
File "videotrans\process\stt_fun.py", line 188, in _resegment
ZeroDivisionError: division by zero

Traceback (most recent call last):
File "videotrans\task\job.py", line 105, in run
File "videotrans\task\_speech2text.py", line 191, 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 106, 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 489, in faster_whisper
File "videotrans\process\stt_fun.py", line 188, in _resegment
ZeroDivisionError: division by zero
TaskCfgSTT(is_cuda=True, uuid='abaad39e97', cache_folder='J:/软件/win-pyvideotrans-v3.99-0508/tmp/7516/abaad39e97', target_dir='J:/软件/win-pyvideotrans-v3.99-0508/output/recogn', source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code=None, target_sub='J:/软件/win-pyvideotrans-v3.99-0508/output/recogn/测试3月1日下午20260301_162313.srt', target_wav=None, target_wav_output=None, name='C:/Users/28006/Desktop/测试3月1日下午20260301_162313.mp4', noextname='测试3月1日下午20260301_162313', basename='测试3月1日下午20260301_162313.mp4', ext='mp4', dirname='C:/Users/28006/Desktop', shound_del_name=None, detect_language='zh-cn', recogn_type=0, model_name='large-v3', shibie_audio='J:/软件/win-pyvideotrans-v3.99-0508/tmp/7516/abaad39e97/测试3月1日下午20260301_162313-1778332036.9656973.wav', remove_noise=True, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False)


=
system:Windows-10-10.0.19041-SP0
version:v3.99
frozen:True
language:zh
root_dir:J:/软件/win-pyvideotrans-v3.99-0508

1 Replies

ZeroDivisionError: division by zero 发生在语音识别重分段阶段,通常因音频被分割出的某个片段时长为零(或时间戳异常)导致,与 VAD 参数或音频文件本身有关。

解决方案

  1. 调整语音识别高级参数(菜单 → 工具/选项 → 高级选项 → 语音识别参数):

    • 将“最短语音持续毫秒”设为 20003000(避免过短片段)。
    • 将“静音分割持续毫秒”设为 500(减少误分割)。
    • 将“最长语音持续秒数”设为 6(不要超过30)。
    • 尝试在“Whisper预分割音频”选项上打勾。
  2. 临时关闭降噪:当前设置中 remove_noise=True,可尝试取消勾选“降噪”后再运行。
  3. 检查输入音频:确认视频文件时长不为零(较短或静音视频可能导致此错误)。
  4. 换用小模型测试:将模型从 large-v3 临时改为 mediumsmall,看问题是否复现。

如果调整后仍然报错,请提供 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