#4499 aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host wss://speech.platform.bing.com/consumer/spe

114.220* Posted at: 1 hour ago 👁9

连接超时,请检查网络连接是否稳定:
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 125, in run
RuntimeError: no running event loop

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 1189, in _create_connection
File "aiohttp\connector.py", line 1561, in _create_direct_connection
File "aiohttp\connector.py", line 1530, in _create_direct_connection
File "aiohttp\connector.py", line 1245, in _wrap_create_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 17, in run
File "videotrans\tts\__init__.py", line 325, in run
File "videotrans\tts\_base.py", line 176, in run
File "videotrans\tts\_edgetts.py", line 68, in _create_audio_with_retry
File "asyncio\tasks.py", line 445, in wait_for
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=1ede38facf514f169db8a43190dbc8f0&Sec-MS-GEC=CF5C6A3F144C0BF6A2AEAB53FFE1DCEE0DE2449D454DE93DEED117F3F35F451E&Sec-MS-GEC-Version=1-143.0.3650.75


=
system:Windows-10-10.0.26200-SP0
version:v3.96
frozen:True
language:zh
root_dir:E:/pyvideotrans/396

1 Replies

连接超时是因为 Edge-TTS 被微软限流或网络不通。

解决方案:

  1. 降低并发数:点击菜单栏 工具/选项 → 高级选项 → 字幕配音调整,将 EdgeTTS 配音渠道配音并发数 改为 1,将 配音后暂停秒数 改为 5-10 秒
  2. 检查网络代理:如果在中国大陆,请确保主界面“网络代理地址”已正确填写(如 http://127.0.0.1:7890),或尝试更换代理节点。
  3. 更换配音渠道:若持续失败,建议改用 OpenAI TTSAzure TTS 或本地 TTS 渠道(如 F5-TTS、CosyVoice)。

请查阅相关文档:

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.

Related resource

Similar issues already exist