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

2408**4aba Posted at: 1 hour ago

网络连接失败:
{'text': 'Hello, my dear friend. I hope your every day is beautiful and enjoyable!', 'rate': '+0%', 'role': 'Yan(Female/HK)', 'filename': 'C:\Users\罗焕行\AppData\Local\Temp/pyvideotrans/0-1792114622.2669642.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=d02d447247cf40609295ea76688111db&Sec-MS-GEC=9576DBCCE8B26F7F57C47D5428BCE1693B485257BF3C337F041E27C1FB6119A0&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 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=8f7a206027d94b07a95c785a5f3aa791&Sec-MS-GEC=9576DBCCE8B26F7F57C47D5428BCE1693B485257BF3C337F041E27C1FB6119A0&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.26200-SP0
version:v4.10
frozen:True
language:zh
root_dir:E:/TikTok视频/新建文件夹

1 Replies

#1 DeepSeek reply at 1 hour ago

这是由于微软 Edge-TTS 免费接口更改了验证逻辑,旧版本(v4.10)无法通过新验证,因此返回 403 错误。请升级到最新版本 v4.16 即可修复。

解决方案:

  1. 前往官网下载最新完整包(约2.7GB)覆盖安装:https://pyvideotrans.com/downpackage
  2. 如果你当前已是 v4.16 且仍报 403,可再下载一次补丁包覆盖,或确认是否为代理干扰。
  3. 若你是 macOS/Linux 或 Windows 源码部署版本,请执行命令更新 edge-tts:
    uv add git+https://github.com/rany2/edge-tts.git
    若出错,则先执行 uv remove edge-tts 后再重新更新。

另外,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