#5132 TaskCfg(cache_folder=None, target_dir='f:/桌面/win-pyvideotrans-v3.92/output/translate', remove_noise=False, is_separate=F

1.80* Posted at: 5 hours ago

翻译字幕阶段出错 [硅基流动] The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification
:srtfile='F:/桌面/win-pyvideotrans-v3.92/output/recogn/序列 02_1.srt'
content=''
Traceback (most recent call last):
File "videotrans\task\job.py", line 184, in run
File "videotrans\task\_translate_srt.py", line 44, in trans
File "videotrans\util\help_srt.py", line 679, in get_subtitle_from_srt
RuntimeError: The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification
:srtfile='F:/桌面/win-pyvideotrans-v3.92/output/recogn/序列 02_1.srt'
content=''

TaskCfg(cache_folder=None, target_dir='f:/桌面/win-pyvideotrans-v3.92/output/translate', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code='German', target_language_code='Simplified Chinese', source_sub='F:/桌面/win-pyvideotrans-v3.92/output/recogn/序列 02_1.srt', target_sub='f:/桌面/win-pyvideotrans-v3.92/output/translate/序列 02_1.Simplified Chinese.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='序列 02_1', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=10, tts_type=None, recogn_type=None, model_name=None, split_type=0, voice_autorate=False, video_autorate=False, cuda=False, name='F:/桌面/win-pyvideotrans-v3.92/output/recogn/序列 02_1.srt', basename='序列 02_1.srt', ext='srt', dirname='F:/桌面/win-pyvideotrans-v3.92/output/recogn', shound_del_name=None, uuid='60da7bbda3', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.92
frozen:True
language:zh
root_dir:F:/桌面/win-pyvideotrans-v3.92

1 Replies

翻译字幕阶段出错,核心原因是语音识别步骤生成的字幕文件为空(SRT 文件 序列 02_1.srt 内容为 ''),导致翻译模块无法读取。请按以下步骤排查:

  1. 检查字幕文件:用文本编辑器打开 F:/桌面/win-pyvideotrans-v3.92/output/recogn/序列 02_1.srt,确认是否为空或只有空白行。
  2. 重新执行时勾选“清理已生成”:在主界面左上角勾选此选项,强制重新进行语音识别,避免使用损坏的缓存文件。
  3. 验证语音识别配置

    • 确保“原始语言”选择正确(日志显示为 German)。
    • 如果使用本地模型(如 faster-whisper),检查模型是否正确下载、CUDA 是否启用、显存是否充足。
    • 如果原始视频音频质量差(背景噪声、无人声、语言选择错误),会导致识别结果为空。可尝试在人声清晰的环境下重新测试。
  4. 检查日志:打开软件根目录下 logs/ 文件夹中的最新日志文件,搜索 recogn识别出错 关键词,定位语音识别阶段的具体错误信息。
  5. 路径建议:如有条件,将视频文件及输出目录的路径改为纯英文且无特殊符号(如 D:\test\video.mp4),避免中文字符或长路径的潜在干扰。

如果以上步骤无法解决,请提供 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. Dondate: ko-fi.com/jianchang512

Related resource