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

216.234**4 Posted at: 1 hour ago

Network connection failed:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunyang(Male/CN)', 'filename': 'C:\Users\ADMINI~1\AppData\Local\Temp/pyvideotrans/0-1793094823.477739.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=5b73c8db110f4898b448127b505888b8&Sec-MS-GEC=911457CD973A07E39BD8D9485B2BD13F7538882B385244F5FAB0241D6FF0AF75&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 118, in run
File "videotrans\tts\_base.py", line 92, 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=486269b0a55a4bf08347a0bc784643c7&Sec-MS-GEC=911457CD973A07E39BD8D9485B2BD13F7538882B385244F5FAB0241D6FF0AF75&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.19045-SP0
version:v4.13
frozen:True
language:zh_CN
root_dir:D:/Program Files/win-pyvideotrans-v4.13-1

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 Edge-TTS 免费接口的 403 鉴权封禁错误(WSServerHandshakeError: 403),v4.13 版本的 edge-tts 库已无法通过微软的新鉴权校验,必须升级到 v4.16 才能修复,与网络代理、字幕内容无关。

解决方案(按顺序操作)

  1. 到官网下载 v4.16 完整包(或 v4.16 补丁包并完整覆盖,务必连同 _internal、videotrans 文件夹一起覆盖,不能只替换 sp.exe):
    https://pyvideotrans.com/downpackage
  2. 若为源码部署(MacOS/Linux/Windows 源码版),执行更新 edge-tts:

    uv add git+https://github.com/rany2/edge-tts.git

    若上述命令报错,先执行 uv remove edge-tts,再重新执行上面的 uv add 命令。

  3. 若升级后仍偶发 403,进入 菜单 → 工具/选项 → 高级选项 → 字幕配音调整:

    • 将 EdgeTTS配音渠道配音并发数 设为 1
    • 将 配音后暂停秒 设为 5~10
      以降低请求频率,避免被微软限流。
  4. 若填写了网络代理导致连接失败,可在软件根目录新建空文件 edgetts-noproxy.txt,强制 Edge-TTS 绕过代理直连。
  5. 附加建议:当前软件位于 D:/Program Files/win-pyvideotrans-v4.13-1,含空格且处于系统受限目录,易引发写入与调用异常,建议解压到 D:/pyvideotrans 这类简短纯英文路径,并将该目录加入杀毒软件信任名单。

请查阅相关文档:

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