#8336 Connection timeout, please check network stability:{'text': 'สวัสดีเพื่อนรักของฉัน ขอให้ทุกๆ วันของคุณเป็นวันที่สวยงามแล

223.74**9 Posted at: 1 hour ago

Connection timeout, please check network stability:
{'text': 'สวัสดีเพื่อนรักของฉัน ขอให้ทุกๆ วันของคุณเป็นวันที่สวยงามและมีความสุขนะ!', 'rate': '+0%', 'role': 'Premwadee(Female/TH)', 'filename': 'C:\Users\86147\AppData\Local\Temp/pyvideotrans/0-1792567948.4411178.wav', 'tts_type': 0, 'language': 'th', 'volume': '+0%', 'pitch': '+0Hz'}
Traceback (most recent call last):
File "aiohttp\connector.py", line 1412, in _start_tls_connection
File "asyncio\base_events.py", line 1253, in start_tls
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "aiohttp\client.py", line 725, in _connect_and_send_request
File "aiohttp\connector.py", line 622, in connect
File "aiohttp\connector.py", line 1187, in _create_connection
File "aiohttp\connector.py", line 1677, in _create_proxy_connection
File "aiohttp\connector.py", line 1397, in _start_tls_connection
File "async_timeout\__init__.py", line 179, in aexit
File "async_timeout\__init__.py", line 265, in _do_exit
asyncio.exceptions.TimeoutError

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

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 122, in run
File "videotrans\tts\_base.py", line 95, in run
File "asyncio\runners.py", line 44, in run
File "asyncio\base_events.py", line 649, in run_until_complete
File "videotrans\tts\_edgetts.py", line 161, in _exec
File "edge_tts\communicate.py", line 590, in save
File "edge_tts\communicate.py", line 566, in stream
File "edge_tts\communicate.py", line 431, in __stream
File "aiohttp\client.py", line 1482, in aenter
File "aiohttp\client.py", line 1061, in _ws_connect
File "aiohttp\client.py", line 770, in _request
File "aiohttp\client.py", line 729, in _connect_and_send_request
aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=89f59a48c15641fdaa695e35f2b4549d&Sec-MS-GEC=EC82F87EAC5A9B02192ADBE07D667B931EC9CF51FB000E70C7694E2226291F0C&Sec-MS-GEC-Version=1-143.0.3650.75


=
system:Windows-10-10.0.22631-SP0
version:v4.15
frozen:True
language:zh_CN
root_dir:D:/360MoveData/Users/86147/Desktop/win-pyvideotrans-v4.15

1 Replies

#1 DeepSeek reply at 1 hour ago

这是由于 Edge-TTS 请求经过了你本地设置的网络代理,而该代理无法完成到微软语音服务 wss://speech.platform.bing.com 的 WebSocket 连接(日志中的 _create_proxy_connection → start_tls → TimeoutError 即为证据)。Edge-TTS 本身是国内可直连的微软免费接口,走代理反而容易超时失败。

解决方案(按顺序尝试)

1. 强制 Edge-TTS 绕过代理(最有效)
在软件根目录 D:/360MoveData/Users/86147/Desktop/win-pyvideotrans-v4.15/ 下新建一个空文本文件,命名为:

edgetts-noproxy.txt

(内容留空即可),保存后重启软件再试。

2. 检查代理填写
主界面「同步对齐」行右侧有网络代理文本框。若填了 http://127.0.0.1:端口 之类:

  • 确认代理软件正在运行、端口正确;
  • 若你只是翻译中文/使用国内 API,可直接清空该文本框保存,避免无效代理拖累所有请求。

3. 降低 Edge-TTS 请求频率
菜单 → 工具/选项 → 高级选项 → 字幕配音调整:

  • EdgeTTS配音渠道配音并发数 设为 1
  • 配音后暂停秒 设为 5~10
  • EdgeTTS配音渠道失败重试次数 适当调大(如 3~5)

4. 建议升级到 v4.16
v4.16 修复了 Edge-TTS 403 及连接相关问题(源码部署需执行 uv add git+https://github.com/rany2/edge-tts.git)。

5. 备选方案
若 Edge-TTS 持续不稳定,泰语配音可改用内置渠道 OmniVoice-TTS(支持所有内置语言)或云 API 渠道。

请查阅相关文档:

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