#3016 aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url='wss://speech.platform.bin

2408:8210* Posted at: 3 days ago 👁32

配音阶段出错:Traceback (most recent call last):
File "edge_tts\communicate.py", line 502, in stream
File "edge_tts\communicate.py", line 366, 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&Sec-MS-GEC=42CF41FAFE8EDCD3A1BD4AC201678403250AE2FC63491AE225DCE1B035CC49F6&Sec-MS-GEC-Version=1-130.0.2849.68&ConnectionId=e3ea53f875244c00b2d8c6148ad0a534'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 132, in run
File "videotrans\task\_dubbing.py", line 43, in dubbing
File "videotrans\task\_dubbing.py", line 83, in _tts
File "asyncio\runners.py", line 44, in run
File "asyncio\base_events.py", line 646, in run_until_complete
File "videotrans\task\_dubbing.py", line 78, in _async_dubb
File "edge_tts\communicate.py", line 526, in save
File "edge_tts\communicate.py", line 509, in stream
File "edge_tts\communicate.py", line 366, 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&Sec-MS-GEC=42CF41FAFE8EDCD3A1BD4AC201678403250AE2FC63491AE225DCE1B035CC49F6&Sec-MS-GEC-Version=1-130.0.2849.68&ConnectionId=881ef198df844639afd00b70df91ee2f'


=
Windows-10-10.0.26200-SP0
version:v3.78
frozen:True
language:zh

2 Replies

这是由于使用 Edge-TTS 配音时并发请求过高,触发了微软服务器的 403 限流错误。

解决方案:

  1. 在软件主界面,点击菜单栏的“工具” -> “高级选项”。
  2. 在“通用设置”选项卡下,找到“同时配音线程数”,将其设置为 1
  3. 在同一页面,找到“配音后暂停秒数”,将其设置为 510 秒。
  4. 点击“保存”并重启软件,然后重新尝试配音任务。

请查阅相关文档:

edgetts接口变了,这个音色已无法使用 升级最新版,使用尚可使用的音色

Post Your Reply
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.

Related resource