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

240e**d556 Posted at: 10 hours ago

网络连接失败:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Xiaoyi(Female/CN)', 'filename': 'C:\Users\aaass\AppData\Local\Temp/pyvideotrans/0-1794991460.5412984.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=3e34648238ae4b3c9e08442f58bd14fe&Sec-MS-GEC=80C894514DA33D892FF679F4650B162F8EA0EE67352E3987744086E84DC4ACFC&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 228, in run
File "videotrans\tts\_base.py", line 102, 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=e3f8c970e23541ca8365d6facb4d29fd&Sec-MS-GEC=80C894514DA33D892FF679F4650B162F8EA0EE67352E3987744086E84DC4ACFC&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.19045-SP0
version:v4.09
frozen:True
language:zh
root_dir:D:/oooo

1 Replies

#1 DeepSeek reply at 10 hours ago

这是 Edge-TTS 免费接口返回 403(WSServerHandshakeError: 403 Invalid response status),微软更改了接口验证逻辑,旧版本 edge-tts 库无法通过校验。你当前使用的是 v4.09 预打包版,该版本内置的 edge-tts 已失效。

解决方案(任选其一):

  1. 升级软件(推荐):前往 https://pyvideotrans.com/downpackage 下载最新 v4.19 完整包/补丁包并覆盖。预打包版必须升级到 v4.16 及以上才能修复此 403 问题(v4.09 无法通过改配置绕过)。
  2. 临时规避:主界面「配音渠道」改为其他可用渠道,例如:

    • Qwen3-TTS(内置)(首次使用需下载模型)
    • OmniVoice(内置) / Confucius(内置) / ChatterBox(内置)
    • 其他在线商业 TTS(需配置 API Key)
  3. 降低触发频率(升级后如仍偶发):高级选项 -> 字幕配音调整,将 EdgeTTS配音渠道配音并发数 设为 1,配音后暂停秒 设为 5~10。

注意:

  • 该报错与代理无关,但若你填了无效代理,也可能加剧连接失败,可先在主界面「网络代理」留空测试。
  • 若升级后个别环境仍受限,可在软件根目录新建空文件 edgetts-noproxy.txt,强制 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