#6877 网络连接失败:{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'gtts', 'filename': 'D:/02软件硬盘转移/win-pyvideotrans-v

240e:**:7711 Posted at: 3 hours ago

网络连接失败:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'gtts', 'filename': 'D:/02软件硬盘转移/win-pyvideotrans-v4.09/tmp/6620/listen_voice/25-zh-cn-gtts-+0%-+0Hz.wav', 'tts_type': 25, 'language': 'zh-cn', 'volume': '+0%', 'pitch': '+0Hz'}
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 105, 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 21, in run
File "videotrans\tts\__init__.py", line 228, in run
File "videotrans\tts\_base.py", line 107, 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.09
frozen:True
language:zh
root_dir:D:/02软件硬盘转移/win-pyvideotrans-v4.09

1 Replies

#1 DeepSeek reply at 3 hours ago

这是 gTTS 配音渠道引起的网络连接失败。gTTS 调用的是 Google 的在线语音合成服务,国内网络环境无法直接访问 Google,因此报错 Failed to connect

解决方案:

  1. 在软件菜单中配置可用的网络代理(格式如 http://127.0.0.1:端口socks5://127.0.0.1:端口),并确保代理工具已开启;若代理仍无效,请检查格式是否正确。
  2. 如果不想折腾代理,建议直接将配音渠道切换为 Edge-TTS(免费、无需科学上网),在配音渠道下拉框选择 Edge-TTS,再从配音角色中选择合适的音色即可。

请查阅相关文档:

Thinking...
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 via ko-fi.com

Related resource