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

2409**7164 Posted at: 2 hours ago

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


=
system:Windows-10-10.0.18363-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:C:/win-pyvideotrans

1 Replies

#1 DeepSeek reply at 2 hours ago

这是 Edge-TTS 接口返回 HTTP 403 导致的。微软已更改 Edge-TTS 免费接口的验证逻辑,旧版本(你当前为 v4.14)无法正常连接,需要更新到 v4.16 才能修复。

解决办法:

  1. 前往官方下载最新完整包或补丁包,并覆盖到软件根目录:
    https://pyvideotrans.com/downpackage
  2. 如果你使用的是 MacOS / Linux 或 Windows 源码部署,则需更新 edge-tts 库:

    • 在项目目录执行 uv add git+https://github.com/rany2/edge-tts.git
    • 若报错,先执行 uv remove edge-tts,再重新执行上面的命令
  3. 如果你暂时无法升级,可以临时改用其他配音渠道,例如 gTTS(需科学上网)或在主界面切换至本地 TTS(如 Qwen3-TTS、OmniVoice-TTS 等),但建议尽快升级,因为旧版 Edge-TTS 大概率会持续报 403。

请查阅相关文档:

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