#8659 Network connection failed:{'text': '안녕, 나의 소중한 친구야. 너의 매일매일이 아름답고 즐겁기를 바라!', 'rate': '+0%', 'role': 'SunHi(Female/KR)',

2406**38f Posted at: 1 hour ago

Network connection failed:
{'text': '안녕, 나의 소중한 친구야. 너의 매일매일이 아름답고 즐겁기를 바라!', 'rate': '+0%', 'role': 'SunHi(Female/KR)', 'filename': 'C:\Users\Public\Documents\ESTsoft\CreatorTemp/pyvideotrans/0-1793794841.360851.wav', 'tts_type': 0, 'language': 'ko', '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=a30c85c279da47228681c11f4c31043d&Sec-MS-GEC=07231D279E1A5BBC57D8D00373440748818972151AED29B1225F43A0BDB2D107&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 118, in run
File "videotrans\tts\_base.py", line 92, 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=28aa25aa248d4b12a508019df6098511&Sec-MS-GEC=07231D279E1A5BBC57D8D00373440748818972151AED29B1225F43A0BDB2D107&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.26200-SP0
version:v4.13
frozen:True
language:en_US
root_dir:C:/win-pyvideotrans-v4.13-1

1 Replies

#1 DeepSeek reply at 1 hour ago

This 403 error comes from Edge-TTS's WebSocket handshake being rejected (WSServerHandshakeError: 403), which is a known bug in the Edge-TTS library: the Sec-MS-GEC token verification mechanism changed. This bug was fixed in v4.16. You are currently running v4.13 (frozen/pre-packaged build), so this error is expected.

Solution:

  1. Download the latest pre-packaged build (v4.16 or later) from https://pyvideotrans.com/downpackage, extract it to a short English-only path such as D:\pyvideotrans, and run sp.exe from there. This is the only reliable fix for this 403 error in the pre-packaged build. The v4.16 changelog explicitly lists "Fixed the Edge-TTS 403 issue."
  2. If you temporarily cannot upgrade, switch to another TTS channel in the TTS Service row (for example, gTTS(Free), or a local built-in channel such as Qwen3-TTS(Built-in) or F5-TTS(Built-in)).
  3. Also check network reachability to speech.platform.bing.com. In mainland China, fill in your proxy in the Proxy field in the sync row (format http://127.0.0.1:7890); make sure the proxy is running and the port is correct. If you do not understand this, leave it empty.
  4. For source deployments on macOS/Linux or Windows, the official fix is to update the edge-tts library: run uv add git+https://github.com/rany2/edge-tts.git; if that fails, run uv remove edge-tts first and then update again. This does not apply to the frozen pre-packaged build; for that, upgrade the whole package as in step 1.

Note: the current UI is v4.13. After upgrading to the latest version, option names may differ slightly from the documentation; search for similarly named options.

Please refer to the related documentation:

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