#857 RuntimeError: recognition connection failed: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

*3ae:a908* Posted at: 5 hours ago 👁8

语音识别阶段出错:recognition connection failed: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。[Google识别API(免费)]:

Traceback (most recent call last):

File "videotrans\recognition\_base.py", line 70, 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\trans_create.py", line 375, in recogn

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

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

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

File "videotrans\recognition\_google.py", line 67, in _exec

File "speech_recognition\__init__.py", line 712, in recognize_google

speech_recognition.exceptions.RequestError: recognition connection failed: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

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

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

RuntimeError: recognition connection failed: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个错误是由于在使用Google识别API进行语音识别时网络连接失败导致的。错误代码WinError 10060表示连接超时,通常是因为网络环境问题无法访问Google服务。

解决方案:

1. 更换语音识别渠道(推荐):Google识别API需要稳定的国际网络连接,建议改用其他语音识别方式:

  • 使用faster-whisper本地模式:在语音识别设置中选择"faster-whisper",第一次使用会自动下载模型,之后完全在本地运行,无需网络连接
  • 使用阿里FunASR中文识别:对中文识别效果很好,国内网络可正常访问

2. 如果必须使用Google识别API

  • 确保已开启科学上网,并在软件的网络代理设置中配置正确的代理地址
  • 检查网络连接稳定性,Google服务在国内访问经常不稳定

3. 操作步骤

  • 打开软件,进入"语音识别设置"
  • 将识别渠道从"Google识别API"改为"faster-whisper"或"阿里FunASR"
  • 重新运行语音识别任务

本地识别模式虽然需要下载模型文件(约几百MB到几GB),但之后的使用更加稳定,不受网络波动影响,特别适合国内用户。

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