#8274 Network connection failed:{'text': 'Hello, my dear friend, I hope every day of yours is wonderful and joyful!', 'rate':

140.235**5 Posted at: 1 hour ago

Network connection failed:
{'text': 'Hello, my dear friend, I hope every day of yours is wonderful and joyful!', 'rate': '+0%', 'role': 'Steffan(Male/US)', 'filename': 'C:\Users\24666\AppData\Local\Temp/pyvideotrans/0-1792395974.5635118.wav', 'tts_type': 0, 'language': 'en', 'volume': '+0%', 'pitch': '+0Hz'}
Traceback (most recent call last):
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 1078, in _ws_connect
aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url='wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=3604ef481b56487fb76aeb5d630cc4b1&Sec-MS-GEC=39ECAA904752E024D5E286693902FC17321E565FE6C2D9177F0DEE5BA1907D75&Sec-MS-GEC-Version=1-143.0.3650.75'

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 119, in run
File "videotrans\tts\_base.py", line 93, 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 154, in _exec
File "edge_tts\communicate.py", line 590, in save
File "edge_tts\communicate.py", line 573, in stream
File "edge_tts\communicate.py", line 431, in __stream
File "aiohttp\client.py", line 1482, in aenter
File "aiohttp\client.py", line 1078, in _ws_connect
aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url='wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=217e5618c8c44be4b53d722af0a8aebe&Sec-MS-GEC=39ECAA904752E024D5E286693902FC17321E565FE6C2D9177F0DEE5BA1907D75&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.22000-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:D:/ABC

1 Replies

#1 DeepSeek reply at 1 hour ago

Edge-TTS 免费微软接口的验证逻辑已经变更,因此微软服务端返回了 403 WSServerHandshakeError,也就是握手被拒绝;这与您的网络无关,属于旧版本 edge-tts 库无法通过微软的 Sec-MS-GEC 校验导致的。您的版本是 v4.14,该问题已在 v4.16 中修复。

解决方案(按顺序操作):

  1. 升级到 v4.16:下载最新的 v4.16 完整包或补丁包并覆盖旧版本目录;覆盖时请注意要连同 _internal、videotrans 文件夹一起覆盖,而不是只替换 sp.exe。Windows 预打包版升级后即可直接使用。
  2. 如果没有立刻升级,可以先降低请求频率,以缓解 403 报错:

    • 菜单 → 工具 → 高级选项 → 字幕配音:将 EdgeTTS配音渠道配音并发数 设为 1,将 配音后暂停秒 设为 5~10。
  3. 如果升级后仍然报 403,而且您的网络环境使用了代理,请在软件根目录 D:/ABC 下新建一个空文件 edgetts-noproxy.txt,以强制 Edge-TTS 绕过代理直连。
  4. 如果您是源码部署,而不是预打包版,请执行下面这条命令更新 edge-tts 库;如果失败,就先执行 uv remove edge-tts,然后再重试:
    uv add git+https://github.com/rany2/edge-tts.git
  5. 如果暂时无法解决,可以先改用 gTTS(免费) 或本地内置的 Qwen3-TTS、OmniVoice 等配音渠道,以避开 Edge-TTS。

请查阅相关文档:

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