#7063 Traceback (most recent call last): File

42.116**0 Posted at: 2 hours ago

Traceback (most recent call last):
File "videotrans\tts\_base.py", line 103, in run
File "videotrans\tts\_gtts.py", line 26, in _exec
File "videotrans\tts\_base.py", line 162, in _local_mul_thread
File "videotrans\tts\_gtts.py", line 46, in _item_task
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 107, in run
File "videotrans\task\_stage_dubbing.py", line 24, in dubbing
File "videotrans\task\_stage_dubbing.py", line 101, in _tts
File "videotrans\tts\__init__.py", line 233, in run
File "videotrans\tts\_base.py", line 105, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_gtts.py", line 42, in _run
File "gtts\tts.py", line 335, in save
File "gtts\tts.py", line 316, in write_to_fp
File "gtts\tts.py", line 263, in stream
File "gtts\tts.py", line 210, in _prepare_requests
AssertionError: No text to send to TTS API

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/Admin/Videos/Sourcevideo/Cô ấy được tái sinh bảy ngày trước ngày tận thế.mp4,
输出结果保存到文件夹: C:/Users/Admin/Videos/VideoTrans/Cô ấy được tái sinh bảy ngày trước ngày tận thế-mp4,
临时文件夹: D:/A-win-pyvideotrans-v4.11/tmp/16164/d773fbbe7e
未选 清理已存在
已启用CUDA加速
未选 降噪
STT Service:faster-whisper(Built-in), large-v3-turbo, 发音语言: Simplified Chinese, 断句方式:默认断句
发音语言和目标语言相同,不翻译字幕
TTS Service:gTTS(Free), 角色:gtts, 配音语言:Simplified Chinese, 未选 二次语音识别
音量:+20%, 语速:+4%, 已选 音频加速, 未选 视频慢速
字幕: Hard Subtitles
已选 仅输出mp4


=
system:Windows-10-10.0.28000-SP0
version:v4.11
frozen:True
language:en
root_dir:D:/A-win-pyvideotrans-v4.11

1 Replies

#1 DeepSeek reply at 2 hours ago

The error occurs because the gTTS engine received an empty text string from a subtitle line. This AssertionError: No text to send to TTS API is triggered when the software attempts to synthesize speech from a blank SRT entry.

Root cause analysis:
Your video's filename is in Vietnamese (Cô ấy được tái sinh...), but you have set the pronunciation language to Simplified Chinese and the target language to the same (发音语言和目标语言相同). Forcing faster-whisper to transcribe a Vietnamese audio track as Chinese AI speech will generate empty or garbage lines in the SRT file. Those empty lines are then passed directly to gTTS, causing the crash.

Steps to resolve:

  1. Correct the language settings:
    Set 发音语言 (source language) to vi (Vietnamese) to match the actual audio. If you want to translate it into Chinese, set 目标语言 to zh-cn. If you intend to keep the original language without translation, set both to vi.
  2. Enable "清理已生成" (Clean generated files):
    Since this error likely stems from a previously generated bad cache file, check the 清理已生成 box in the main interface. This ensures ASR and TTS run from scratch and don't reuse the corrupted empty subtitle file.
  3. Switch the TTS channel:
    gTTS (Free) requires a proxy in mainland China and is prone to failures. Use the built-in Edge-TTS (Free) instead, which is stable and supports all languages.
  4. Manually inspect the SRT file (if the issue persists):
    Go to your output folder (C:/Users/Admin/Videos/VideoTrans/Cô ấy...-mp4) and open the generated .srt file. Look for lines that contain only timestamps but no text. Delete those empty entries and re-run the task without checking "清理已生成" to preserve your manual fixes.

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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