#8104 连接超时,请检查网络连接是否稳定. EdgeTTS使用频繁可能触发限流,请稍等段时间重试。:{'text': 'Hello, my dear friend, I hope every day of yours is wonderful an

47.250**1 Posted at: 3 hours ago

连接超时,请检查网络连接是否稳定. EdgeTTS使用频繁可能触发限流,请稍等段时间重试。:
{'text': 'Hello, my dear friend, I hope every day of yours is wonderful and joyful!', 'rate': '+0%', 'role': 'Ezinne(Female/NG)', 'filename': 'C:\Users\Hannibal\AppData\Local\Temp/pyvideotrans/0-1791961196.0899396.wav', 'tts_type': 0, 'language': 'en', '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 132, 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://api.msedgeservices.com/tts/cognitiveservices/websocket/v1?Ocp-Apim-Subscription-Key=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=20010493e88e4774b562d0de7953c0c7&Sec-MS-GEC=19B68B6626CCA4E87733BD453CF2EFEDB515D682832829471405FE89907B702C&Sec-MS-GEC-Version=1-143.0.3650.75


=
system:Windows-10-10.0.26200-SP0
version:v4.16
frozen:True
language:zh
root_dir:F:/pyvideotrans

1 Replies

#1 DeepSeek reply at 3 hours ago

这是 Edge-TTS 连接超时,核心原因通常有三类:本机无法连接微软 wss://api.msedgeservices.com 服务、软件代理配置异常、或 Edge-TTS 短时间内请求过多被限流。

按以下步骤排查:

  1. 确认网络可访问微软服务
    Edge-TTS 是国内需“科学上网”的在线接口,请测试能否访问 https://api.msedgeservices.com。无法访问时请更换网络或开启稳定的代理。
  2. 检查软件内代理设置

    • 主界面“对齐控制”行右侧有网络代理文本框。若填写了代理,确保格式为 http://127.0.0.1:端口 且代理进程已运行;否则请清空该框。
    • 若已开代理但仍超时,可在软件根目录(F:/pyvideotrans)新建空白文件 edgetts-noproxy.txt,强制 Edge-TTS 绕过代理直连。
  3. 降低 Edge-TTS 调用频率
    进入 菜单 → 工具/选项 → 高级选项 → 字幕配音调整,将:

    • EdgeTTS配音渠道配音并发数 设为 1
    • 配音后暂停秒 设为 5~10
  4. 等待限流恢复或切换渠道
    若确认是限流,请暂停几分钟后再试。频繁使用仍失败时,可改用 gTTS(免费) 或本地 Qwen3-TTS、F5-TTS 等渠道。
  5. 确保已更新至 v4.16
    当前版本已是 v4.16,已修复 Edge-TTS 403 问题;若仍出现该超时,多为网络或限流问题。

请查阅相关文档:

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