#4508 TaskCfgTTS(is_cuda=True, uuid='48b92f8c80', cache_folder='G:/win-pyvideotrans-v3.98-317/tmp/18996/48b92f8c80', target_di

5.83* Posted at: 1 hour ago 👁7

配音阶段出错 [Edge-TTS(免费)] 连接超时,请检查网络连接是否稳定
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 127, 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 324, in run
File "videotrans\tts\_base.py", line 189, 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=f20e26ec0efc40789d99f02e75a541c0&Sec-MS-GEC=B4DC2AC7139EB2EE8017FF30170D4ED7B71CF319A23EE0329060EB7F1C656DD4&Sec-MS-GEC-Version=1-143.0.3650.75
TaskCfgTTS(is_cuda=True, uuid='48b92f8c80', cache_folder='G:/win-pyvideotrans-v3.98-317/tmp/18996/48b92f8c80', target_dir='G:/win-pyvideotrans-v3.98-317/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='zh-cn', target_sub='G:/YouTube/Louis Van Loon Ad Schaerlaeckens The Men Who Built the Modern Ra/字幕.srt', target_wav='G:/win-pyvideotrans-v3.98-317/output/tts/字幕.wav', target_wav_output=None, name='G:/YouTube/Louis Van Loon Ad Schaerlaeckens The Men Who Built the Modern Ra/字幕.srt', noextname='字幕', basename='字幕.srt', ext='srt', dirname='G:/YouTube/Louis Van Loon Ad Schaerlaeckens The Men Who Built the Modern Ra', shound_del_name=None, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Xiaoxiao(Female/CN)', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.98
frozen:True
language:zh
root_dir:G:/win-pyvideotrans-v3.98-317

1 Replies

Edge-TTS 连接超时,原因是软件无法访问微软的语音服务 speech.platform.bing.com,通常是因为在国内没有配置网络代理,或被微软限流。

解决方案:

  1. 配置网络代理:如果你有 VPN 或代理服务,在主界面的“网络代理地址”文本框中填入代理地址(例如 http://127.0.0.1:7890),格式参考你代理客户端的端口。
  2. 降低并发并增加暂停:在菜单栏 工具/选项 -> 高级选项 -> 字幕配音调整 中,将“EdgeTTS配音渠道配音并发数”设为 1,“配音后暂停秒”设为 5~10 秒,避免触发微软限流。
  3. 检查网络连通性:可用浏览器访问 https://speech.platform.bing.com 测试是否能正常打开。

如果仍失败,请提供日志文件(logs/ 目录下最新 .log 文件底部 30 行)。

请查阅相关文档:

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