#8637 网络连接失败:{'text': 'Hello, my dear friend. I hope your every day is beautiful and enjoyable!', 'rate': '+0%', 'role': 'Sam(

27.129**2 Posted at: 1 hour ago

网络连接失败:
{'text': 'Hello, my dear friend. I hope your every day is beautiful and enjoyable!', 'rate': '+0%', 'role': 'Sam(Male/HK)', 'filename': 'C:\Users\liang\AppData\Local\Temp/pyvideotrans/0-1793712088.7799652.wav', 'tts_type': 0, 'language': 'en', '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=0ae0cd25d24d43eeb303f72c1d655fec&Sec-MS-GEC=8F046F0347263B02A7A20F9926A679897875157596D5A9BF9137B65443602A71&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 230, 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 152, 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=6a2c4868db9f43b7b1ef950b40ac7272&Sec-MS-GEC=8F046F0347263B02A7A20F9926A679897875157596D5A9BF9137B65443602A71&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.26200-SP0
version:v4.09
frozen:True
language:zh
root_dir:D:/BaiduNetdiskDownload/win-pyvideotrans-v4.09-0816

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 Edge-TTS 的微软免费接口验证逻辑变更导致的 403 拒绝握手(WSServerHandshakeError: 403),并非你的网络或代理配置问题,v4.09 内置的 edge-tts 版本已失效。

解决方案(预打包版):

  1. 前往官网下载最新版本(v4.16 或更新)的完整包或补丁包,覆盖到当前 D:/BaiduNetdiskDownload/win-pyvideotrans-v4.09-0816 目录(补丁包内所有文件和文件夹都需覆盖,尤其是 sp.exe、_internal、videotrans 文件夹)。
  2. 覆盖前建议先删除旧目录内所有 __pycache__ 文件夹,避免缓存残留。
  3. 若覆盖后仍报版本过旧,说明仅覆盖了 sp.exe,需完整覆盖全部文件。
  4. 更新后为进一步避免限流,进入 菜单 → 工具/选项 → 高级选项 → 字幕配音调整,将 EdgeTTS配音渠道配音并发数 设为 1,配音后暂停秒 设为 5~10。

临时替代方案(不升级时):

  • 主界面配音渠道改用 gTTS(免费)(国内需代理),或改用内置渠道如 Qwen3-TTS(内置)、OmniVoice(内置)、ZipVoice中英(内置) 等。
  • 若使用代理,可在软件根目录创建空文件 edgetts-noproxy.txt 强制 Edge-TTS 绕过代理重试。

注意:配置文件 params.json / cfg.json 位于 videotrans/ 内,覆盖升级不会丢失你的密钥和设置。

请查阅相关文档:

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