#654 RuntimeError: ('recognition request failed: Bad Gateway',):GoogleRecogn

*224.245* Posted at: 6 hours ago 👁8

语音识别阶段出错:Traceback (most recent call last):

File "videotrans\recognition\_base.py", line 64, 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 "videotrans\configure\_except.py", line 82, in _raise

RuntimeError: ('recognition request failed: Bad Gateway',)

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

Traceback (most recent call last):

File "videotrans\task\trans_create.py", line 376, in recogn

File "videotrans\recognition\__init__.py", line 200, in run

File "videotrans\recognition\_base.py", line 67, in run

videotrans.configure._except.SpeechToTextError: ('recognition request failed: Bad Gateway',):GoogleRecogn

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "videotrans\task\job.py", line 77, in run

File "videotrans\task\trans_create.py", line 412, in recogn

RuntimeError: ('recognition request failed: Bad Gateway',):GoogleRecogn

=====

Windows-10-10.0.26100-SP0

version:v3.78

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个问题是由于在语音识别阶段,软件尝试通过 Google Speech 识别服务处理视频时,遇到了网络连接问题(Bad Gateway)导致的。这通常意味着 Google 的服务器暂时不可用或您的网络连接不稳定。

解决方案:

1. 检查网络连接: 请确保您的计算机可以稳定访问国际网络(Google 服务)。可以尝试刷新网页或运行其他需要访问国外网站的程序来测试。

2. 切换语音识别渠道: 这是最直接有效的解决方法。由于网络问题可能间歇性出现,建议您使用软件内置的本地识别模型,它们不依赖外部网络服务。

  • 在软件界面的“语音识别”设置中,将识别渠道从 “GoogleSpeech识别” 切换到其他选项,例如:
  • faster-whisper本地模式(推荐,速度快,准确率高)
  • openai-whisper本地模式
  • 切换后,软件会下载必要的模型文件(通常只需一次),之后即可离线进行语音识别,彻底避免此类网络错误。

3. 稍后重试: 如果您必须使用 Google 服务,可以等待一段时间后再重试任务,这可能是 Google 服务器端的临时故障。

详细分析:

从错误日志 RuntimeError: ('recognition request failed: Bad Gateway',):GoogleRecogn 可以明确看出,错误发生在使用 GoogleRecogn(即 Google Speech 识别)时。Bad Gateway (502错误) 是一个标准的 HTTP 状态码,表示作为网关或代理的服务器从上游服务器(此处是 Google 的服务器)收到了一个无效的响应。这通常是暂时的服务中断或网络问题。

您的软件版本(v3.78)和系统(Windows 10)信息正常,问题根源在于所选的云端识别服务不可用。

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions