#7331 Traceback (most recent call last): File

204.13**2 Posted at: 3 hours ago

Traceback (most recent call last):
File "videotrans\recognition\_base.py", line 99, 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 65, in recogn
File "videotrans\recognition\__init__.py", line 232, in run
File "videotrans\recognition\_base.py", line 108, 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 710, in recognize_google
speech_recognition.exceptions.RequestError: recognition request failed: Bad Gateway

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/PC/Desktop/锅架/主图加副图视频/20220802_7e0ea73a95ce1aa0_371928215601_mp4_264_hd_taobao.mp4,
输出结果保存到文件夹: C:/Users/PC/Desktop/锅架/主图加副图视频/_video_out/20220802_7e0ea73a95ce1aa0_371928215601_mp4_264_hd_taobao-mp4,
临时文件夹: D:/win-pyvideotrans-v4.12-0912/tmp/14612/3810684889
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:Google识别API(免费), , 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:简体中文,目标语言:英语, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入软字幕
代理地址:http://127.0.0.1:7897
video_duration_ms=23866


=
system:Windows-10-10.0.19045-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.12-0912

1 Replies

#1 DeepSeek reply at 3 hours ago

核心原因:您使用的 Google 语音识别 API(免费) 并非官方稳定接口,本质上是通过第三方/代理请求 Google 服务,当前返回了 Bad Gateway(网关错误),说明请求在途中被拦截或 Google 端拒绝了该请求。

结合日志:您填写了代理 http://127.0.0.1:7897,这是问题高发场景,请按以下顺序排查:

  1. 确认代理本身可用:在浏览器开启同一代理,访问 https://www.google.com 是否正常。若打不开,代理已失效,需更换节点或重启代理软件。
  2. 更换节点Bad Gateway 多因当前代理节点 IP 被 Google 标记或线路不稳。切换到其他地区/其他线路的节点后重试。
  3. 考虑改用更稳定的识别渠道(推荐):

    • 免费本地:faster-whisper(内置),模型选 large-v3-turbo,中文识别效果优于 Google 免费识别,且不依赖网络和代理。
    • 若坚持在线:改用配置了密钥的 OpenAI 语音识别API豆包/阿里百炼ASR 等渠道,稳定性远高于 Google 免费识别。
  4. 重试前建议勾选界面上的 清理已生成,避免复用上一次失败的缓存。
补充:Google 免费识别/翻译属非官方接口,限流、封 IP、网关错误是常态,不建议作为主力渠道长期使用。
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