#7979 配音阶段出错 [Edge-TTS(免费)] 网络连接失败Traceback (most recent call last):

103.253**1 Posted at: 1 hour ago

配音阶段出错 [Edge-TTS(免费)] 网络连接失败
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 123, 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 224, in run
File "videotrans\task\_dubbing.py", line 48, in dubbing
File "videotrans\task\_dubbing.py", line 217, in _tts
File "videotrans\tts\__init__.py", line 272, in run
File "videotrans\tts\_base.py", line 190, in run
File "videotrans\tts\_edgetts.py", line 93, 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=52d027ffb15549ccb942431dabcb0575&Sec-MS-GEC=8C5FA8E7D875AE1FDCBF2B3A3CAEEBEAE0E7D8D5A5C41CF576C66C0E1E545B36&Sec-MS-GEC-Version=1-143.0.3650.75'

TaskCfg(cache_folder='E:/huan/tmp/22348/b71fee14db', target_dir='E:/huan/output/tts', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code='th', source_sub=None, target_sub='E:/huan/tmp/22348/20261012-140057.srt', source_wav=None, source_wav_output=None, target_wav='E:/huan/output/tts/20261012-140057.mp3', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='20261012-140057', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+6%', pitch='+0Hz', voice_rate='+10%', voice_role='Premwadee(Female/TH)', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=0, recogn_type=None, model_name=None, split_type=0, voice_autorate=True, video_autorate=False, cuda=False, name='E:/huan/tmp/22348/20261012-140057.srt', basename='20261012-140057.srt', ext='srt', dirname='E:/huan/tmp/22348', shound_del_name=None, uuid='b71fee14db', remove_silent_mid=False, align_sub_audio=False, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.92
frozen:True
language:zh
root_dir:E:/huan

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 Edge-TTS 免费接口被微软临时限流/封禁(HTTP 403)导致的连接失败,常见于短时间高频请求,或本地代理环境干扰。

解决方案(按优先级):

  1. 降低 Edge-TTS 请求频率

    • 打开 菜单 → 工具/选项 → 高级选项 → 字幕配音调整;
    • 将 EdgeTTS配音渠道配音并发数 设为 1;
    • 将 配音后暂停秒 设置为 5~10 秒;
    • 重新执行任务(务必勾选 清理已生成 重试)。
  2. 排除代理干扰

    • 在软件根目录(sp.exe 所在文件夹)创建一个空文件,命名为 edgetts-noproxy.txt,强制 Edge-TTS 绕过代理后重试。
  3. 升级软件版本

    • 你当前版本为 v3.92,已严重落后。最新版本为 v4.15,修复了大量 Edge-TTS 连接与内部错误(包括 no running event loop 相关异常)。
    • 请前往 https://pyvideotrans.com/downpackage 下载完整包覆盖(保留配置无需备份,直接覆盖即可)。
  4. 临时更换配音渠道

    • 若急需完成任务,可先改用其他渠道,例如免费 gTTS(免费) 或本地 Qwen3-TTS(内置)、Piper(内置)。
注:no running event loop 是 403 失败后的附带异常,根因仍是 Edge-TTS 服务端拒绝连接,无需单独处理。

请查阅相关文档:

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