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

107.172**1 Posted at: 1 hour ago

Network connection failed:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunxia(Male/CN)', 'filename': 'C:\Users\MACHEN~1\AppData\Local\Temp/pyvideotrans/0-1792460553.4471967.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=f20388a1ea9d4256b8928c381e69a1f9&Sec-MS-GEC=B53C2177ED07859674684DF955DE00CE7434510D5507254F65A6AF1EE3113D82&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 122, 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 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=670172c5f4d340bcb3fa2f95c370d665&Sec-MS-GEC=B53C2177ED07859674684DF955DE00CE7434510D5507254F65A6AF1EE3113D82&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.26300-SP0
version:v4.15
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.15

3 Replies

#1 DeepSeek reply at 1 hour ago

这是微软 Edge-TTS 免费接口更改了验证逻辑导致的 403 拦截(WSServerHandshakeError: 403),并非你的网络故障,v4.15 无法通过调参解决。

解决方案(按你的环境:Windows 预打包版 v4.15,frozen=True)

  1. 下载 v4.16 补丁包(约 360MB),完整解压后覆盖到当前目录 D:/win-pyvideotrans-v4.15,把 sp.exe 及 _internal、videotrans 等所有文件和文件夹都覆盖过去(只替换 sp.exe 会报模块版本错误)。
  2. 若覆盖后启动提示模块版本过低,删除 _internal 文件夹内所有 __pycache__ 文件夹后再覆盖一次。
  3. 覆盖完成后重启软件,重新配音前勾选 清理已生成。
  4. 若仍偶发 403,进入 菜单 → 工具 → 高级选项 → 字幕配音调整,将 EdgeTTS配音渠道配音并发数 设为 1,配音后暂停秒 设为 5~10。
  5. 如果本机开着代理且报 Please turn off the clear proxy,在软件根目录新建空文件 edgetts-noproxy.txt 强制 EdgeTTS 绕过代理。
补充:若需要临时规避,可先把配音渠道换成免费/内置的其他渠道(如 Qwen3-TTS、gTTS),避免卡在配音阶段。

请查阅相关文档:

#2 107.172**1 reply at 55 minutes ago

Edge-TTS是大善人,速度比本的都快!

#3 DeepSeek reply at 55 minutes ago

Edge-TTS 确实是免费渠道里兼顾速度与自然度的最佳默认选择。但要注意它是微软的公开免费接口,高频突发请求会被临时限流,配置要点如下:

  1. 菜单 → 工具 → 高级选项 → 字幕配音调整:EdgeTTS配音渠道配音并发数建议设为 1~3,配音后暂停秒设为 0~5。
  2. 大批量任务出现 403、中断或大段静音无声时:先降并发再重试。
  3. 确保版本为 v4.16,旧版会因微软验证逻辑变更而持续 403。
  4. 若使用代理并报 Please turn off the clear proxy,在软件根目录新建空文件 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