#5074 TaskCfgTTS(is_cuda=True, uuid='e8c5a798c1', cache_folder='D:/pyvideotrans/win-pyvideotrans-v3.99-428/tmp/9320/e8c5a798c1

5.149* Posted at: 4 hours ago

Dubbing Error [Edge-TTS(Free)] Connection timeout, please check network stability
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 128, in run
RuntimeError: no running event loop

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "aiohttp\client.py", line 725, in _connect_and_send_request
File "aiohttp\connector.py", line 622, in connect
File "aiohttp\connector.py", line 1189, in _create_connection
File "aiohttp\connector.py", line 1561, in _create_direct_connection
File "aiohttp\connector.py", line 1530, in _create_direct_connection
File "aiohttp\connector.py", line 1245, in _wrap_create_connection
File "async_timeout\__init__.py", line 179, in aexit
File "async_timeout\__init__.py", line 265, in _do_exit
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\task\job.py", line 213, in run
File "videotrans\task\_dubbing.py", line 51, in dubbing
File "videotrans\task\_dubbing.py", line 209, in _tts
File "videotrans\tts\__init__.py", line 370, in run
File "videotrans\tts\_base.py", line 193, in run
File "videotrans\tts\_edgetts.py", line 66, 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 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 1061, in _ws_connect
File "aiohttp\client.py", line 770, in _request
File "aiohttp\client.py", line 729, in _connect_and_send_request
aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=733ee1f16d0c45e0be0fd1a3484869c6&Sec-MS-GEC=2B4F984FD92D1A3664B8FD683643AC377C862B7968E9FDCDB69CCD2EFF430A4A&Sec-MS-GEC-Version=1-143.0.3650.75
TaskCfgTTS(is_cuda=True, uuid='e8c5a798c1', cache_folder='D:/pyvideotrans/win-pyvideotrans-v3.99-428/tmp/9320/e8c5a798c1', target_dir='D:/pyvideotrans/win-pyvideotrans-v3.99-428/output/tts', source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code='ar', target_sub='D:/courses/Certified Ethical Hacker (CEH) v13/Udemy - Certified Ethical Hacker (CEH) v13 2025-7/4 - Module 4 Enumeration/1 -4.1 Enumeration Overview_ar.srt', target_wav='D:/pyvideotrans/win-pyvideotrans-v3.99-428/output/tts/1 -4.1 Enumeration Overview_ar.wav', target_wav_output=None, name='D:/courses/Certified Ethical Hacker (CEH) v13/Udemy - Certified Ethical Hacker (CEH) v13 2025-7/4 - Module 4 Enumeration/1 -4.1 Enumeration Overview_ar.srt', noextname='1 -4.1 Enumeration Overview_ar', basename='1 -4.1 Enumeration Overview_ar.srt', ext='srt', dirname='D:/courses/Certified Ethical Hacker (CEH) v13/Udemy - Certified Ethical Hacker (CEH) v13 2025-7/4 - Module 4 Enumeration', shound_del_name=None, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Zariyah(Female/SA)', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.99
frozen:True
language:en
root_dir:D:/pyvideotrans/win-pyvideotrans-v3.99-428

1 Replies

The error originates from Edge-TTS failing to connect to Microsoft's server due to a timeout (ConnectionTimeoutError). This usually happens when:

  • Your network cannot reach speech.platform.bing.com (e.g., temporary outage, firewall, or misconfigured proxy).
  • You triggered Microsoft's rate‑limiting by sending too many requests too quickly.

Solutions (try in order):

  1. Reduce Edge‑TTS concurrency and add delay
    Go to Menu → Tools/Options → Advanced Options → Subtitle Dubbing Adjustment, set:

    • EdgeTTS dubbing concurrent thread count to 1
    • Pause seconds after dubbing to 5 (or up to 10 for longer jobs)
      This avoids overwhelming Microsoft's endpoint.
  2. Check network stability
    Verify that you can access https://www.bing.com in a browser. If behind a corporate or school network, Microsoft's TTS endpoint may be blocked – try a different network (e.g., mobile hotspot).
  3. Disable any proxy if you are not using one
    If you filled in the Network Proxy field on the main interface, make sure it's correct. If you don't have a proxy, leave that field empty. An incorrect proxy will cause connection timeouts.
  4. Retry the task
    After the above adjustments, re‑process the video (check Clear generated if needed to force re‑dubbing).

If the problem persists with these settings, provide the latest log file (from logs/ folder) so we can check for other issues.

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. Dondate: ko-fi.com/jianchang512

Related resource