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

134.195**0 Posted at: 1 hour ago

网络连接失败:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunxi(Male/CN)', 'filename': 'C:\Users\yang1\AppData\Local\Temp/pyvideotrans/0-1792360944.477886.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=56de0ac509844ef4916abd8dde9ce8c4&Sec-MS-GEC=F0C96FD81C29334BBD94AA3FB42457CACB4D0EE6A90E371605132CBED1C25308&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 233, in run
File "videotrans\tts\_base.py", line 100, 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=6237e997fd9048cf996c44016c3f612a&Sec-MS-GEC=F0C96FD81C29334BBD94AA3FB42457CACB4D0EE6A90E371605132CBED1C25308&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.26300-SP0
version:v4.11
frozen:True
language:zh
root_dir:D:/pyVideoTrans/win-pyvideotrans-v4.11

1 Replies

#1 DeepSeek reply at 1 hour ago

这是微软免费接口 Edge-TTS 的验证逻辑变更导致的 403 拒绝,v4.11 版本的 edge-tts 组件已过期,仅靠降低并发、挂代理无法根本解决。

解决方案

1. 升级到 v4.16(根本解决)

  • 你是 Windows 预打包版(版本 v4.11),请到官网下载 v4.16 的补丁包(约360MB),解压后全部文件和文件夹覆盖到 D:/pyVideoTrans/win-pyvideotrans-v4.11 目录(不要只覆盖 sp.exe,_internal 和 videotrans 文件夹必须一起覆盖)。
  • 若旧版与新版差距过大,建议直接下载 v4.16 完整包(约2.7GB)全新解压使用,你的配置文件(videotrans/params.json、cfg.json)不受影响。
  • 覆盖后如仍报模块版本过低,进入 _internal 文件夹搜索 __pycache__,将搜索到的全部删除后再重新覆盖。

2. 如果你是源码部署的版本(此条不适用你的 frozen 打包版,仅供参考)

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

若报错,先执行 uv remove edge-tts 后重新执行上述命令。

3. 升级前临时绕过
将配音渠道临时更换为其他免费/内置渠道,例如 Qwen3-TTS(内置)、OmniVoice-TTS、gTTS(免费),可先跑通流程。

4. 附带建议(升级后仍建议执行)
进入 菜单-工具-高级选项-字幕配音调整,将 EdgeTTS配音渠道配音并发数 设为 1,配音后暂停秒 设为 5-10,避免高频请求被限流。

请查阅相关文档:

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