#5431 gtts.tts.gTTSError: Failed to connect. Probable cause: Unknown

113.88* Posted at: 1 hour ago

网络连接失败:
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 93, in run
File "videotrans\tts\_gtts.py", line 26, in _exec
File "videotrans\tts\_base.py", line 164, in _local_mul_thread
File "videotrans\tts\_gtts.py", line 46, in _item_task
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\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 192, in run
File "videotrans\tts\_base.py", line 95, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_gtts.py", line 42, in _run
File "gtts\tts.py", line 335, in save
File "gtts\tts.py", line 316, in write_to_fp
File "gtts\tts.py", line 287, in stream
gtts.tts.gTTSError: Failed to connect. Probable cause: Unknown


=
system:Windows-10-10.0.19045-SP0
version:v4.03
frozen:True
language:zh
root_dir:G:/VideoTrans

1 Replies

gTTS(Google TTS)在中国大陆访问需要科学上网,你当前的网络环境无法连接 Google 服务器导致失败。

解决方法:

  1. 配置代理:在软件主界面底部“网络代理”输入框中填写你的代理地址,格式如 http://127.0.0.1:7890,然后保存重试。
  2. 更换配音渠道:推荐改用无需代理的 Edge-TTS(免费、国内直连),在主界面“配音渠道”下拉框中选择 Edge-TTS 即可。
  3. 如果代理已配置仍失败,请检查代理是否可用或尝试切换其他节点。

请查阅相关文档:

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. Dondate: ko-fi.com/jianchang512

Related resource

Similar issues already exist