#8647 网络连接失败:{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunyang(Male/CN)', 'filename': 'C:\\Users\\Admin\\

117.182**2 Posted at: 1 hour ago

网络连接失败:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunyang(Male/CN)', 'filename': 'C:\Users\Admin\AppData\Local\Temp/pyvideotrans/0-1793764044.9504626.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=1713554943b74de88379849e8af49465&Sec-MS-GEC=44372BC7BFFCCB9AA4817959ECE1CC6A9460CCFAED3DAFA3A5A1F03681971CD6&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 233, in run
File "videotrans\tts\_base.py", line 100, 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 152, 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=c1fd7e33cc53446c906f6cfe1b3be4be&Sec-MS-GEC=44372BC7BFFCCB9AA4817959ECE1CC6A9460CCFAED3DAFA3A5A1F03681971CD6&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.22631-SP0
version:v4.10
frozen:True
language:zh
root_dir:D:/worktool/win-pyvideotrans-v4.10

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 Edge-TTS 免费接口触发的 403 封禁报错(WSServerHandshakeError: 403)。微软已更改 edge-tts 的验证逻辑,v4.10 内置的旧版 edge-tts 库已无法通过握手,因此必然报错。

解决方案

  1. 升级到最新版本(根本解决)
    下载 v4.16 或最新完整包/补丁包覆盖当前目录 D:/worktool/win-pyvideotrans-v4.10(覆盖时保留 videotrans/params.json、cfg.json 即可保留配置)。

    • 源码部署(Windows 源码/Mac/Linux)需执行:uv add git+https://github.com/rany2/edge-tts.git,若出错则先 uv remove edge-tts 再重新执行上述更新命令。
  2. 排除代理干扰
    Edge-TTS 走高版本代理时也易失败。在软件根目录(sp.exe 同级)新建空文件 edgetts-noproxy.txt,强制该渠道不走代理。
  3. 降低请求频率(升级后仍需遵守)
    进入 菜单 → 工具/选项 → 高级选项 → 字幕配音调整:

    • EdgeTTS配音渠道配音并发数 设为 1
    • 配音后暂停秒 设为 5~10
  4. 若仍不稳定,可换配音渠道
    改用 Qwen3-TTS(内置)、ChatterBox(内置)、ZipVoice中英(内置) 等本地渠道,或 豆包语音合成2.0 等云 API,避免受免费接口限流影响。

请查阅相关文档:

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