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

121.228* Posted at: 2 hours ago 👁10

连接超时,请检查网络连接是否稳定:
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 128, 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 16, in run
File "videotrans\tts\__init__.py", line 370, in run
File "videotrans\tts\_base.py", line 181, in run
File "videotrans\tts\_edgetts.py", line 66, 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=a5c8f86f88324c409a07ddd9d3e6fb40&Sec-MS-GEC=CC8755567C51D0F2C1C1E33D9AACADB68CA2E70F28D61074A368B8B45D3CB9A3&Sec-MS-GEC-Version=1-143.0.3650.75


=
system:Windows-10-10.0.26200-SP0
version:v3.99
frozen:True
language:zh
root_dir:D:/videotrans

1 Replies

这是由于 Edge-TTS 配音渠道连接微软服务器超时导致的。通常是因为网络不稳定、防火墙限制,或者你在没有代理的情况下直接访问了 Bing 语音服务(speech.platform.bing.com 在中国大陆可能被干扰)。

解决方案:

  1. 检查网络连接:确保你的网络可以正常访问外网。可以尝试在浏览器打开 https://speech.platform.bing.com 测试连通性。
  2. 配置网络代理:如果你在中国大陆,或网络访问受限,请在软件主界面的「网络代理地址」框中填入你的代理地址,格式如 http://127.0.0.1:7890(端口号根据你的代理客户端填写)。
  3. 降低并发与请求频率:在菜单栏点击「工具/选项」→「高级选项」,找到「字幕配音调整」部分:

    • EdgeTTS配音渠道配音并发数 设为 1
    • 配音后暂停秒 设为 5 ~ 10
  4. 重试或更换 TTS 渠道:保存设置后重试。如果仍然超时,可以改用其他免费 TTS 渠道,如「OmniVoice-TTS」,同样支持多语言且无需特殊网络。

请查阅相关文档:

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