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

156.229**7 Posted at: 1 hour ago

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


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:D:/Program Files (x86)/pyvideotrans4.14

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 Edge-TTS 渠道的 403 报错。微软免费接口更改了验证逻辑,旧版 edge-tts 组件已无法通过握手验证(WSServerHandshakeError: 403),与你填写的文本、角色、代理均无关。

解决方案

  1. 当前版本 v4.14 已过期,请下载 v4.16 或更高版本(推荐最新 v4.18)的完整包覆盖安装,即可修复。
    下载地址:https://pyvideotrans.com/downpackage
  2. 覆盖升级时需覆盖全部文件(sp.exe、_internal、videotrans 等),不能只替换 sp.exe。若升级后报"模块版本过低",请在 _internal 文件夹内搜索所有 __pycache__ 目录并删除,再重新覆盖。
  3. 若你使用的是源码部署版(Mac/Linux 或 Windows 源码),请执行:

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

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

  4. 升级后仍需降低请求频率:进入 菜单 → 工具/选项 → 高级选项 → 字幕配音调整,将 EdgeTTS配音渠道配音并发数 设为 1,配音后暂停秒 设为 5~10,避免 IP 被临时限流。
  5. 另外注意:你的软件安装在 D:/Program Files (x86)/pyvideotrans4.14,属于系统受限目录,可能导致无法写入临时文件和输出视频。建议整体移动到浅层纯英文路径(如 D:/pyvideotrans)。
  6. 想彻底绕开 403,可改用其他配音渠道,例如 豆包语音合成2.0、Qwen-TTS(bailian)、Qwen3-TTS(内置)、OmniVoice(内置) 等。

请查阅相关文档:

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