#3730 TaskCfgVTT(is_cuda=False, uuid='f6e0359f4e', cache_folder='D:/pyvideotrans/tmp/4808/f6e0359f4e', target_dir='D:/Program

103.108* Posted at: 1 hour ago 👁5

翻译字幕阶段出错 [Gemini AI] Gemini result is emtpy
Traceback (most recent call last):
File "videotrans\translator\_base.py", line 102, in run
File "videotrans\translator\_base.py", line 123, in _run_text
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\job.py", line 173, in run
File "videotrans\task\trans_create.py", line 652, in trans
File "videotrans\translator\__init__.py", line 990, in run
File "videotrans\translator\_base.py", line 104, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 120, in _item_task
RuntimeError: Gemini result is emtpy
TaskCfgVTT(is_cuda=False, uuid='f6e0359f4e', cache_folder='D:/pyvideotrans/tmp/4808/f6e0359f4e', target_dir='D:/Program Files/Desktop/治療2/_video_out/How to release your pec minor with a Trigger Point ball-mp4', source_language='英语', source_language_code='en', source_sub='D:/Program Files/Desktop/治療2/_video_out/How to release your pec minor with a Trigger Point ball-mp4/en.srt', source_wav='D:/pyvideotrans/tmp/4808/f6e0359f4e/en.wav', source_wav_output='D:/Program Files/Desktop/治療2/_video_out/How to release your pec minor with a Trigger Point ball-mp4/en.m4a', target_language='繁体中文', target_language_code='zh-tw', target_sub='D:/Program Files/Desktop/治療2/_video_out/How to release your pec minor with a Trigger Point ball-mp4/zh-tw.srt', target_wav='D:/pyvideotrans/tmp/4808/f6e0359f4e/target.wav', target_wav_output='D:/Program Files/Desktop/治療2/_video_out/How to release your pec minor with a Trigger Point ball-mp4/zh-tw.m4a', name='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release/How to release your pec minor with a Trigger Point ball.mp4', noextname='How to release your pec minor with a Trigger Point ball', basename='How to release your pec minor with a Trigger Point ball.mp4', ext='mp4', dirname='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release', shound_del_name=None, translate_type=5, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='YunJhe(Male/TW)', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='medium', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='D:/Program Files/Desktop/治療2/_video_out/How to release your pec minor with a Trigger Point ball-mp4/How to release your pec minor with a Trigger Point ball.mp4', novoice_mp4='D:/pyvideotrans/tmp/4808/f6e0359f4e/novoice.mp4', is_separate=False, instrument=None, vocal=None, back_audio='', clear_cache=True, background_music=None, subtitle_type=1, only_out_mp4=True, recogn2pass=True, output_srt=0, copysrt_rawvideo=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.98
frozen:True
language:zh
root_dir:D:/pyvideotrans

1 Replies

翻译阶段出错是因为 Gemini AI 返回了空结果。这通常是由于网络问题、API密钥无效、请求内容触发安全策略或模型暂时不可用导致的。

请按以下步骤排查和解决:

  1. 检查网络代理:Gemini 服务在国内无法直接访问。请确保已在软件主界面的“网络代理地址”中填写了正确的代理地址(格式如 http://127.0.0.1:10808)。
  2. 验证 API 密钥:前往 菜单 -> 翻译设置 -> Gemini AI,确认填写的 API Key 正确且有效,并且已启用该渠道。
  3. 调整请求参数:前往 菜单 -> 工具 -> 高级选项 -> 字幕翻译调整

    • 尝试减少 AI翻译渠道每批字幕行数(例如从 20 改为 5)。
    • 增加 翻译后暂停秒(例如设为 5 秒),以降低请求频率。
    • 如果勾选了 发送完整字幕,请尝试取消勾选,改为按行翻译。
  4. 检查请求内容:如果字幕内容可能包含敏感或特殊字符,尝试简化或分段处理。
  5. 查看 Gemini 服务状态:访问 Gemini 官方状态页面,确认服务是否正常运行。

如果以上步骤无法解决,请提供更详细的日志(特别是 Gemini AI 渠道设置面板的截图和日志中 Gemini 相关的请求/响应片段)以便进一步分析。

请查阅相关文档:

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