#8792 翻译字幕阶段出错 [Google(免费)] HTTPSConnectionPool(host='edge.microsoft.com', port=443): Max retries exceeded with url: /translat

165.254**3 Posted at: 3 hours ago

翻译字幕阶段出错 [Google(免费)] HTTPSConnectionPool(host='edge.microsoft.com', port=443): Max retries exceeded with url: /translate/translatetext?from=&to=en&isEnterpriseClient=false (Caused by ConnectTimeoutError(, 'Connection to edge.microsoft.com timed out. (connect timeout=300)'))
Traceback (most recent call last):
File "urllib3\connection.py", line 198, in _new_conn
File "urllib3\util\connection.py", line 85, in create_connection
File "urllib3\util\connection.py", line 73, in create_connection
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 488, in _make_request
File "urllib3\connectionpool.py", line 464, in _make_request
File "urllib3\connectionpool.py", line 1093, in _validate_conn
File "urllib3\connection.py", line 753, in connect
File "urllib3\connection.py", line 207, in _new_conn
urllib3.exceptions.ConnectTimeoutError: (, 'Connection to edge.microsoft.com timed out. (connect timeout=300)')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "requests\adapters.py", line 644, in send
File "urllib3\connectionpool.py", line 841, in urlopen
File "urllib3\util\retry.py", line 519, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='edge.mic
......
atetext?from=&to=en&isEnterpriseClient=false (Caused by ConnectTimeoutError(, 'Connection to edge.microsoft.com timed out. (connect timeout=300)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 113, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 79, in run
File "videotrans\translator\_base.py", line 117, 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 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_microsoft.py", line 49, in _item_task
File "requests\api.py", line 115, in post
File "requests\api.py", line 59, in request
File "requests\sessions.py", line 589, in request
File "requests\sessions.py", line 703, in send
File "requests\adapters.py", line 665, in send
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='edge.microsoft.com', port=443): Max retries exceeded with url: /translate/translatetext?from=&to=en&isEnterpriseClient=false (Caused by ConnectTimeoutError(, 'Connection to edge.microsoft.com timed out. (connect timeout=300)'))

trk=翻译视频 单视频模式
选择音视频文件: J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29.flv,
输出目录: J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29-flv,
self.cfg.cache_folder='D:/pyVideoTrans/app/tmp/32428/ed4aaee93e'
已选 清理已生成, 已选 CUDA加速
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 简体中文
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
计算数据类型:default
识别准确度beam_size:5
识别准确度best_of:5
启用上下文感知:False
重复惩罚:1.0
文本压缩率:2.4
翻译渠道:Google(免费),发音语言:简体中文,目标语言:英语
传统翻译渠道每批字幕行数: 5
配音渠道:Edge-TTS(免费), 配音角色:Ryan(Male/GB), 目标语言:英语
Volume:+0%, Speed:+0%, 未选 配音加速, 未选 视频慢速
未选 删字幕间静音, 未选 对齐字幕声音
已选 移除每条字幕配音开头结尾静音缓冲
静音移除力度: default
不嵌入字幕
video information:{'video_fps': 44.0, 'r_frame_rate': 44.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1088, 'height': 1920, 'time': 0, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='ed4aaee93e', name='J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29.flv', dirname='J:/抖音/梦_想_家_849255259714696', noextname='现场定制铅笔_只要__2026_10_17_04_29', basename='现场定制铅笔_只要__2026_10_17_04_29.flv', ext='flv', target_dir='J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29-flv', cache_folder='D:/pyVideoTrans/app/tmp/32428/ed4aaee93e', is_cuda=True, source_language='简体中文', source_language_code='zh-cn', source_sub='J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29-flv/zh-cn.srt', source_wav='D:/pyVideoTrans/app/tmp/32428/ed4aaee93e/zh-cn.wav', source_wav_output='J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29-flv/zh-cn.m4a', target_language='英语', target_language_code='en', target_sub='J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29-flv/en.srt', target_wav='D:/pyVideoTrans/app/tmp/32428/ed4aaee93e/target.wav', target_wav_output='J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29-flv/en.m4a', translate_type=0, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Ryan(Male/GB)', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=False, detect_language='zh', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='J:/抖音/梦_想_家_849255259714696/现场定制铅笔_只要__2026_10_17_04_29-flv/现场定制铅笔_只要__2026_10_17_04_29.mp4', novoice_mp4='D:/pyVideoTrans/app/tmp/32428/ed4aaee93e/novoice.mp4', is_separate=False, embed_bgm=True, instrument='D:/pyVideoTrans/app/tmp/32428/ed4aaee93e/instrument.wav', vocal='D:/pyVideoTrans/app/tmp/32428/ed4aaee93e/vocal.wav', clear_cache=True, background_music='', subtitle_type=0, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=0


=
system:Windows-10-10.0.19045-SP0
version:v4.18
frozen:True
language:zh_CN
root_dir:D:/pyVideoTrans/app

1 Replies

#1 DeepSeek reply at 3 hours ago

这是网络连接问题,与翻译渠道本身无关:虽然你选择的是 Google(免费),但 Google 请求失败后,程序自动回退到微软免费翻译接口 edge.microsoft.com;该域名同样连接超时(WinError 10060,等待 300 秒无响应)。也就是说,Google 和微软免费接口在当前网络环境下都不可达。常见原因包括:代理未启动、端口填错、代理规则没有覆盖 edge.microsoft.com,或者当前网络被限制。

处理步骤(按顺序尝试):

  1. 检查主界面“网络代理”文本框

    • 如果需要科学上网,填写正确格式:http://127.0.0.1:7890(以你实际代理端口为准),并确认代理软件已启动。
    • 如果不需要代理,或者填写过无效地址,请彻底清空该文本框后再试。代理无效会把原本可直连的微软接口也拖成超时。
  2. 换用国内可直连的渠道,避开需要代理的免费接口(最稳妥)

    • 推荐使用 AI 渠道:DeepSeek。到 https://platform.deepseek.com/ 申请 Key,填入 菜单 → 翻译设置 → DeepSeek,翻译渠道下拉框选 DeepSeek。质量远优于免费接口,费用极低。
    • 或者使用本地离线渠道:M2M100(内置) 或 Hy-MT2(内置),首次使用会自动下载模型;不依赖外网代理,之后可完全离线翻译。
  3. 重试前勾选 清理已生成,避免使用上次失败留下的缓存字幕。
  4. 若坚持使用 Google 渠道:它的调用需要稳定可用的代理,而且节点 IP 容易被 Google 判为异常,返回 429。建议优先使用第 2 步的方案。

补充:你当前没有勾选 配音加速 和 视频慢速,转成英语后配音时长大概率超出原字幕时长,后续可能出现音画不同步,可先勾选 配音加速。

请查阅相关文档:

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