#8050 网络连接失败:{'text': 'Привет, мой дорогой друг. Желаю, чтобы каждый твой день был прекрасен и приятен!', 'rate': '+0%', 'role

240e**a251 Posted at: 1 hour ago

网络连接失败:
{'text': 'Привет, мой дорогой друг. Желаю, чтобы каждый твой день был прекрасен и приятен!', 'rate': '+0%', 'role': 'gtts', 'filename': 'C:\Users\34402\AppData\Local\Temp/pyvideotrans/24-1791875013.808631.wav', 'tts_type': 24, 'language': 'ru', '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 162, 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 221, 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.26200-SP0
version:v4.08
frozen:True
language:zh
root_dir:F:/win-pyvideotrans-v4.08-0802

1 Replies

#1 DeepSeek reply at 1 hour ago

这是网络连接失败导致的。gTTS 是 Google 的免费在线配音接口,在中国大陆无法直接访问,必须配置可用的科学上网代理才能使用。

解决方案:

  1. 检查代理设置:在主界面「对齐控制(Alignment)」行右侧的「网络代理」文本框中,填写可用的 HTTP 代理,格式如 http://127.0.0.1:10808,并确保代理服务已运行、端口正确。
  2. 确认代理能访问 Google 服务:若代理无效或节点不稳定,gTTS 仍会连接失败。可尝试更换更干净的节点。
  3. 若无法使用代理,建议改用其他配音渠道:主界面配音渠道选择 Edge-TTS(免费)(默认推荐,无需代理)或 Qwen3-TTS(内置)、OmniVoice-TTS(内置) 等本地渠道。
  4. 也可升级到最新版本 v4.16,新版对网络处理更稳定。

请查阅相关文档:

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