#2091 TaskCfg(cache_folder='D:/win-videotrans/tmp/10884/26002fc2af', target_dir='D:/Program Files/文档/打工/知识付费/vedio/2/_video_ou

2a02:6ea0* Posted at: 1 day ago 👁15

配音阶段出错:[Edge-TTS(免费)] 运行时错误:The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification
:srtfile='D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4/zh-cn.srt'
content='':
Traceback (most recent call last):
File "videotrans\task\job.py", line 224, in run
File "videotrans\task\trans_create.py", line 496, in dubbing
File "videotrans\task\trans_create.py", line 698, in _tts
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='D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4/zh-cn.srt'
content=''

TaskCfg(cache_folder='D:/win-videotrans/tmp/10884/26002fc2af', target_dir='D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4', remove_noise=True, is_separate=True, detect_language='en', subtitle_language=None, source_language='英语', target_language='简体中文', source_language_code='en', target_language_code='zh-cn', source_sub='D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4/en.srt', target_sub='D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4/zh-cn.srt', source_wav='D:/win-videotrans/tmp/10884/26002fc2af/remove_noise.wav', source_wav_output='D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4/en.m4a', target_wav='D:/win-videotrans/tmp/10884/26002fc2af/target.wav', target_wav_output='D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4/zh-cn.m4a', subtitles='', novoice_mp4='D:/win-videotrans/tmp/10884/26002fc2af/novoice.mp4', noextname='Journey to the edge of the Observable Universe', shibie_audio=None, targetdir_mp4='D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4/Journey to the edge of the Observable Universe.mp4', instrument='D:/win-videotrans/tmp/10884/26002fc2af/instrument.wav', vocal='D:/win-videotrans/tmp/10884/26002fc2af/vocal.wav', back_audio='', background_music=None, app_mode='biaozhun', subtitle_type=1, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Yunyang(Male/CN)', copysrt_rawvideo=False, clear_cache=False, translate_type=0, tts_type=0, recogn_type=0, model_name='large-v3-turbo', split_type=0, voice_autorate=True, video_autorate=True, cuda=True, name='D:/Program Files/文档/打工/知识付费/vedio/2/Journey to the edge of the Observable Universe.mp4', basename='Journey to the edge of the Observable Universe.mp4', ext='mp4', dirname='D:/Program Files/文档/打工/知识付费/vedio/2', shound_del_name=None, uuid='26002fc2af', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.89
frozen:True
language:zh
root_dir:D:/win-videotrans

1 Replies

错误提示表明配音阶段读取到的目标语言字幕文件(zh-cn.srt)是空的或格式不正确。这通常是由于翻译环节失败,导致没有生成有效的字幕内容。

请按以下步骤排查:

  1. 检查翻译结果

    • 前往输出目录 D:/Program Files/文档/打工/知识付费/vedio/2/_video_out/Journey to the edge of the Observable Universe-mp4/
    • 用记事本打开 zh-cn.srt 文件。如果文件是空的或内容异常,说明翻译步骤出了问题。
  2. 重新执行翻译

    • 在主界面,务必勾选“清理已生成”,然后重新处理视频。
    • 在“翻译设置”环节,当弹出字幕编辑窗口时,检查右侧的“目标语言”区域是否已成功生成中文翻译。如果没有,说明翻译渠道或配置有问题。
  3. 检查翻译渠道

    • 确认你选择的翻译渠道(如Google、DeepSeek等)是否可用。
    • 如果使用需要API Key的渠道(如OpenAI、DeepSeek),请确保在“翻译设置”中正确填写了Key。
    • 如果使用Google翻译,请确保网络代理设置正确。
  4. 简化路径(重要)

    • 你的视频路径包含中文和空格(D:/Program Files/文档/打工/知识付费/vedio/2/),这有时会导致文件读写异常。
    • 建议:将视频文件复制到一个纯英文、无空格的短路径下(例如 D:/video/),然后重新尝试。
  5. 查看详细日志

    • 如果以上步骤无法解决,请提供 D:/win-videotrans/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.

Donate: https://ko-fi.com/jianchang512

Trending Questions