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

142.91**0 Posted at: 6 hours ago

Network connection failed:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunjian(Male/CN)', 'filename': 'C:\Users\szmxh\AppData\Local\Temp/pyvideotrans/0-1795270496.7078755.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=f8e2140ef6b04c749874c3919e0dac80&Sec-MS-GEC=D07F8163E6F9715EB6155F34F8064EB99A2C1EF0D761CB196F1FBF884FDC638F&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=5e6738bd4ef1441a98f53823c06d3b75&Sec-MS-GEC=D07F8163E6F9715EB6155F34F8064EB99A2C1EF0D761CB196F1FBF884FDC638F&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 6 hours ago

这是 Edge-TTS 免费接口的 403 鉴权失败。微软在 v4.14 之后更改了 edge-tts 的验证逻辑,v4.14 内置的旧版 edge-tts 库已无法通过鉴权,出现 WSServerHandshakeError: 403。

解决方案(按顺序执行):

  1. 升级软件到 v4.16 及以上版本(v4.19 为当前最新)。你当前是 v4.14 冻结预打包版,直接去官网下载最新完整包(2.6GB+)解压覆盖,或下载最新补丁包覆盖旧目录(补丁包需覆盖 sp.exe、_internal、videotrans 等全部内容,不能只覆盖 sp.exe)。升级 v4.16 已修复该 403 问题。

    • 覆盖后若仍提示模块版本过低,请在旧目录的 _internal 文件夹内搜索 __pycache__,删除所有搜到的文件夹后再覆盖。
  2. 迁移安装目录(重要):你当前安装在 D:/Program Files (x86)/pyvideotrans4.14,Program Files (x86) 属于系统受保护目录,软件无法正常写入临时文件和输出结果,容易引发各类异常。请将整个软件文件夹移动到浅层纯英文目录,例如 D:/pyvideotrans。
  3. 若升级后仍偶发 403 或配音中断:进入 菜单 → 工具/选项 → 高级选项 → 字幕配音调整,把 EdgeTTS配音渠道配音并发数 设为 1,配音后暂停秒 设为 5~10,降低请求频率避免被微软限流。
  4. 替代方案:若 Edge-TTS 长期不稳定,可在配音渠道改用 Qwen3-TTS(内置)、OmniVoice(内置)、ChatterBox(内置) 等本地内置渠道,或 豆包语音合成2.0、阿里 Qwen-TTS 等云 API 渠道。

注:role: 'Yunjian(Male/CN)' 说明你是在"试听"或文字配音功能中触发的,同样受此 bug 影响,需升级软件。

请查阅相关文档:

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