#7045 网络连接失败Traceback (most recent call last):

103.62**0 Posted at: 1 hour ago

网络连接失败
Traceback (most recent call last):
File "videotrans\recognition\_base.py", line 98, in run
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 70, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 211, in run
File "videotrans\recognition\_base.py", line 105, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\recognition\_google.py", line 58, in _exec
File "speech_recognition\__init__.py", line 712, in recognize_google
speech_recognition.exceptions.RequestError: recognition connection failed: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/21214/Documents/WXWork/1688857312966227/Cache/Video/2026-09/video(23).mp4,
输出结果保存到文件夹: D:/桌面/翻译/video(23)-mp4,
临时文件夹: D:/fanyiruanjian/tmp/45472/6744861c02
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:Google识别API(免费), , 发音语言: 英语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunxi(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 已选 视频慢速
字幕: 不嵌入字幕
已选 仅输出mp4
代理地址:http://127.0.0.1:7897


=
system:Windows-10-10.0.26200-SP0
version:v4.11
frozen:True
language:zh
root_dir:D:/fanyiruanjian

1 Replies

#1 DeepSeek reply at 1 hour ago

这是由于 Google 语音识别 API 在国内网络环境下无法直接访问,连接超时(WinError 10060)。虽然你已填写代理 http://127.0.0.1:7897,但该代理可能未生效或无法连通 Google 服务。

解决步骤:

  1. 确认代理服务已启动且端口 7897 正确(可在浏览器测试访问 https://www.google.com 是否成功)。
  2. 若代理协议为 SOCKS5,请将代理地址改为 socks5://127.0.0.1:7897 并重新保存。
  3. 若仍失败,建议直接改用本地离线语音识别渠道,避免网络依赖,例如:faster-whisper(内置)openai-whisper(内置),选择 large-v3-turbo 模型,效果稳定。
  4. 翻译渠道也可同步换为本地 M2M100(内置) 或离线大模型。

请查阅相关文档:

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