#8201 Network connection failed:{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunxia(Male/CN)', 'filename': '

58.37**7 Posted at: 2 hours ago

Network connection failed:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunxia(Male/CN)', 'filename': 'G:/BaiduNetdiskDownload/win-pyvideotrans-v4.14/tmp/2012/listen_voice/0-zh-cn-1792132544.0716302.wav', 'tts_type': 0, 'language': 'zh-cn', '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=984e4066256240349b9569d2e400202f&Sec-MS-GEC=5B104FC19942822030148CBE49973C0E08F4DD8979775B9AA3CBEA06D02D1BA1&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=2d86c731b47545008378b26a51cbcdfc&Sec-MS-GEC=5B104FC19942822030148CBE49973C0E08F4DD8979775B9AA3CBEA06D02D1BA1&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:G:/BaiduNetdiskDownload/win-pyvideotrans-v4.14

1 Replies

#1 DeepSeek reply at 2 hours ago

这是由于 Edge-TTS 免费接口的 403 封禁错误。微软已更改了 Edge-TTS 的验证逻辑,旧版本(如 v4.14)会持续报 WSServerHandshakeError: 403。

解决方案:

  1. 升级到最新版 v4.16(Windows 预打包版请下载覆盖);源码部署的用户执行:uv add git+https://github.com/rany2/edge-tts.git,若出错先执行 uv remove edge-tts 再重新更新。
  2. 若升级后仍偶发 403,进入 菜单 → 工具 → 高级选项 → 字幕配音调整,将 EdgeTTS配音渠道配音并发数 设为 1,配音后暂停秒 设为 5~10,降低请求频率。
  3. 若使用代理导致连接问题,可在软件根目录创建空文件 edgetts-noproxy.txt 强制绕过代理。

请查阅相关文档:

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