#8778 网络连接失败:{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunyang(Male/CN)', 'filename': 'D:/win-pyvideotran

36.152**8 Posted at: 11 minutes ago

网络连接失败:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'Yunyang(Male/CN)', 'filename': 'D:/win-pyvideotrans-v4.11/tmp/14908/listen_voice/0-zh-cn-1794479654.2066395.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=cc908e65138e44a4ab01d4a81c3a0282&Sec-MS-GEC=B59FFD7275D8D160EA3E9E13903AB2F7F917C2EC9AA4C287E1D5B1E1B8DC63E0&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=a58d4821c4cb47a5a48f7872c0ab54cc&Sec-MS-GEC=B59FFD7275D8D160EA3E9E13903AB2F7F917C2EC9AA4C287E1D5B1E1B8DC63E0&Sec-MS-GEC-Version=1-143.0.3650.75'


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

1 Replies

#1 DeepSeek reply at 10 minutes ago

这是 Edge-TTS 免费接口遇到 403 报错。微软修改了 edge-tts 的鉴权逻辑,v4.11 内置的旧版 edge-tts 已经失效,并非你的网络问题。

解决方案:

  1. 下载 v4.16 或更新版本的补丁包或完整包,覆盖到 D:/win-pyvideotrans-v4.11 目录(配置文件 videotrans/params.json、cfg.json 不会被覆盖,无需重新配置)。
  2. 覆盖时务必完整替换 sp.exe、_internal 文件夹和 videotrans 文件夹。如果覆盖后仍提示模块版本过旧,请先在旧版 _internal 目录内搜索并删除所有 __pycache__,再重新覆盖一次。
  3. 覆盖完成后重启软件再试听。

如果升级后仍然出现“网络连接失败”,请检查代理:Edge-TTS 使用代理时可能连接失败,可在软件根目录新建一个空的 edgetts-noproxy.txt 文件,强制 Edge-TTS 不走代理。
另外,如果短时间内大量试听或配音触发限流,也可在 菜单—工具/选项—高级选项—配音设置 中把 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