#8516 Dubbing Error [Edge-TTS(Free)] Network connection failedTraceback (most recent call last):

202.150**5 Posted at: 2 hours ago

Dubbing Error [Edge-TTS(Free)] Network connection failed
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 130, in run
RuntimeError: no running event loop

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 214, in run
File "videotrans\task\_dubbing.py", line 52, in dubbing
File "videotrans\task\_dubbing.py", line 222, in _tts
File "videotrans\tts\__init__.py", line 319, in run
File "videotrans\tts\_base.py", line 192, in run
File "videotrans\tts\_edgetts.py", line 68, in _create_audio_with_retry
File "asyncio\tasks.py", line 445, in wait_for
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=3e072a2f31e644e180853806963ba94b&Sec-MS-GEC=539377BFB65E003745569BB133546961CD5F6BB714F82645F56A760685F08250&Sec-MS-GEC-Version=1-143.0.3650.75'
TaskCfgTTS(is_cuda=True, uuid='41ae40c67a', cache_folder='E:/ytrans/tmp/24364/41ae40c67a', target_dir='E:/en/Section 01 - Intro', source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code='en', target_sub='E:/2023/personal/inspo2/Songi/subtitle/en/Section 01 - Intro/01.Orientation Telling Your Story through Animated Film.en.srt', target_wav='E:/en/Section 01 - Intro/01.Orientation Telling Your Story through Animated Film.en.mp3', target_wav_output=None, name='E:/en/Section 01 - Intro/01.Orientation Telling Your Story through Animated Film.en.srt', noextname='01.Orientation Telling Your Story through Animated Film.en', basename='01.Orientation Telling Your Story through Animated Film.en.srt', ext='srt', dirname='E:/en/Section 01 - Intro', shound_del_name=None, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+25%', voice_role='Emma(Female/US)', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.97
frozen:True
language:en
root_dir:E:/ytrans

1 Replies

#1 DeepSeek reply at 2 hours ago

The root cause of this error is that Microsoft has changed the authentication logic of its free Edge-TTS interface, so the old v3.97 you are using no longer works and the WebSocket handshake is rejected with 403 Invalid response status (the no running event loop line is only an internal exception caught and re-raised, not the real cause). It is also possible that a network proxy is interfering.

Step 1: Upgrade the software (mandatory, the 403 is fixed in v4.16 and later)

  • Portable (packaged) build: download the latest full package from https://pyvideotrans.com/downpackage and overwrite the whole software directory; copying only sp.exe is not enough.
  • Source deployment: run uv add git+https://github.com/rany2/edge-tts.git; if that fails, run uv remove edge-tts first and then run the add command again.

Step 2: Rule out proxy interference

  • Clear the proxy box on the main interface; leave it empty if you do not need a proxy.
  • Create an empty edgetts-noproxy.txt file in the software root directory to force Edge-TTS to bypass the proxy.

Step 3: Avoid rate limiting (403 is sometimes also caused by too many requests)

  • Go to Menu → Tools/Options → Advanced Options → Dubbing Settings, set EdgeTTS Max Concurrency to 1, and set Post-Dubbing Delay (s) to 5~10.

Step 4: If it still fails after the above steps

  • Switch to another free TTS channel such as gTTS, or to a built-in channel such as Qwen3-TTS(Built-in) for dubbing.

If it still fails after upgrading, please provide the latest error log from the logs/ folder in the software installation directory.

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