#6773 The srt subtitles were not read. The file may be empty or the format does not conform to the SRT specification:srtfile='

2408:**:4585 Posted at: 2 hours ago

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/EV录制文件/_video_out/8月10日-mp4/zh-cn.srt'
content=''
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 89, in run
File "videotrans\task\_stage_translate.py", line 28, in trans
File "videotrans\util\_srt_parse.py", line 187, 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/EV录制文件/_video_out/8月10日-mp4/zh-cn.srt'
content=''

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/Program Files/EV录制文件/8月10日.mp4,
输出结果保存到文件夹: D:/Program Files/EV录制文件/_video_out/8月10日-mp4,
临时文件夹: D:/Program Files (x86)/pyVideoTranss/tmp/16380/85359e459a
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:微软(免费),原始语言:简体中文,目标语言:英语, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:WilliamMultilingual(Male/AU), 配音语言:英语, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 已选 视频慢速
字幕: 嵌入硬字幕


=
system:Windows-10-10.0.19045-SP0
version:v4.10
frozen:True
language:zh
root_dir:D:/Program Files (x86)/pyVideoTranss

1 Replies

#1 DeepSeek reply at 2 hours ago

这是“语音识别阶段没有生成任何字幕”导致的。报错中的 zh-cn.srt 是源语言(简体中文)字幕文件,翻译阶段前它应该是非空文件;现在 content='' 表示文件为空,所以软件无法读取。

请按以下顺序排查:

  1. 检查 D:/Program Files/EV录制文件/_video_out/8月10日-mp4/zh-cn.srt 是否为 0KB。如果是 0KB,说明 ASR 没有识别出任何语音。
  2. 用播放器打开原视频,确认有人声;如果只有背景音乐/纯画面,则无法生成字幕。
  3. 如果确实有人声,先手动删除 D:/Program Files/EV录制文件/_video_out/8月10日-mp4 整个文件夹,再重新执行,不要只依赖“清理已生成”。
  4. 建议把原视频和软件都放到纯英文数字、无空格、无中文的短路径下,例如 D:\videos\test.mp4;不要放在 Program Files 或含中文的路径中,否则可能因权限/路径问题导致中间文件写入异常。
  5. 如果视频有噪声,勾选“降噪”或“分离人声背景声”后再试;中文视频也可换用 Qwen-ASR阿里FunASR 识别渠道。
  6. 若仍然失败,请提供 logs/ 目录下最新日志中“语音识别阶段”附近的约30行报错信息,以及软件左上角版本号。

请查阅相关文档:

Thinking...
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 via ko-fi.com

Related resource