#6870 翻译字幕阶段出错 [Google(免费)] Google 翻译失败Traceback (most recent call last):

2a01:**:a4d1 Posted at: 9 hours ago

翻译字幕阶段出错 [Google(免费)] Google 翻译失败
Traceback (most recent call last):

File "videotrans\translator\_base.py", line 68, in run

File "videotrans\translator\_base.py", line 107, 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 35, in run

File "videotrans\task\job.py", line 137, in process_task

File "videotrans\task\_stage_translate.py", line 31, in trans

File "videotrans\translator\_runner.py", line 58, in run

File "videotrans\translator\_base.py", line 74, in run

File "tenacity\__init__.py", line 480, in call

File "videotrans\translator\_google.py", line 36, in _item_task

videotrans.configure.excepts.TranslateSrtError: Google 翻译失败
[TransCreate]翻译视频: self.is_copy_video=True,self.video_codec_num=264,self.is_audio_trans=False,self.video_info={'video_fps': 23.976023976023978, 'r_frame_rate': 23.976023976023978, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1280, 'height': 720, 'time': 2623797, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: D:/视频/第二季/逝者能言第二季20.mp4,
输出结果保存到文件夹: D:/视频/_video_out/第二季/逝者能言第二季20-mp4,
临时文件夹: D:/BaiduNetdiskDownload/win-pyvideotrans-v4.11/tmp/19508/50b1d090f7
未选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
已选 将生成的字幕复制到视频目录下
输出字幕格式: 单字幕
代理地址:http://127.0.0.1:8502


=
system:Windows-10-10.0.26100-SP0
version:v4.11
frozen:True
language:zh
root_dir:D:/BaiduNetdiskDownload/win-pyvideotrans-v4.11

1 Replies

#1 DeepSeek reply at 9 hours ago

Google(免费) 翻译失败的核心原因是:Google 翻译接口在中国大陆无法直接访问,需要有效的代理网络。您的日志中虽已配置代理 http://127.0.0.1:8502,但该代理可能未正确转发请求或 Google 接口被限流。

解决方案

  1. 验证代理是否有效:打开浏览器,访问 https://translate.google.com,确认能正常打开且能翻译。若打不开,说明代理本身未生效,需先修复代理。
  2. 更换翻译渠道(推荐):Google 免费渠道极其不稳定,建议改用以下渠道:

    • DeepSeek:翻译质量最佳,价格极低(可充值1元),需在 菜单→翻译设置→DeepSeek 填写 API Key,并在翻译渠道中选择 Deepseek
    • 微软翻译:仅限 v4.09+ 版本,但官方接口已变更,可能需要补丁包覆盖,若仍报错建议直接换 DeepSeek。
    • 阿里百炼 API:国内直连无需代理,需在阿里云开通服务。
  3. 若仍想用 Google

    • 确认代理软件已全局开启,且端口与软件中填写的完全一致
    • 高级选项→字幕翻译调整 中,将 传统翻译渠道每批字幕行数 设为 1,降低请求频率
    • 关闭 发送完整字幕(Google 免费渠道不支持该模式,可能导致格式异常)
  4. 检查代理格式:正确格式为 http://127.0.0.1:8502,若代理需要用户名密码,需写成 http://user:[email protected]:8502
注意:国内访问百度、腾讯、阿里、DeepSeek 等国内 API 时不需要代理。若后续换用国内渠道,请清空代理地址保存,避免不必要的网络问题。
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