#7610 配音阶段出错 [Edge-TTS(免费)] edge-tts error:target_audio='D:/pyvideotrans/tmp/6048/05ab5333da/1-10章-edgetts-txt-1790304440.5990

2409**5c16 Posted at: 2 hours ago

配音阶段出错 [Edge-TTS(免费)] edge-tts error:target_audio='D:/pyvideotrans/tmp/6048/05ab5333da/1-10章-edgetts-txt-1790304440.5990844.mp3'
Traceback (most recent call last):

File "aiohttp\connector.py", line 1263, in _wrap_create_connection

File "asyncio\base_events.py", line 1103, in create_connection

File "asyncio\base_events.py", line 1133, in _create_connection_transport

File "asyncio\selector_events.py", line 862, in _read_ready__data_received

ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

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

Traceback (most recent call last):

File "videotrans\task\_base.py", line 259, in _edgetts_single

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 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 1271, in _wrap_create_connection

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host speech.platform.bing.com:443 ssl: [远程主机强迫关闭了一个现有的连接。]

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

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 156, in process_task

File "videotrans\task\dubbing.py", line 56, in dubbing

File "videotrans\task\dubbing.py", line 138, in _tts

File "asyncio\runners.py", line 44, in run

File "asyncio\base_events.py", line 649, in run_until_complete

File "videotrans\task\_base.py", line 270, in _edgetts_single

videotrans.configure.excepts.DubbingSrtError: edge-tts error:target_audio='D:/pyvideotrans/tmp/6048/05ab5333da/1-10章-edgetts-txt-1790304440.5990844.mp3'
[DubbingSrt]语音合成: self.out_ext='mp3',self.is_multi_role=False
[TaskCfgTTS]
原始输入文件名: C:/Users/yftadad/Desktop/Ebook/道医/1-10章.txt,
输出结果保存到文件夹: D:/pyvideotrans/output/tts,
临时文件夹: D:/pyvideotrans/tmp/6048/05ab5333da
已启用CUDA加速
配音渠道:Edge-TTS(免费), 角色:Yunxia(Male/CN), 配音语言:zh-cn
音量:+2%, 语速:+1%, 未选 音频加速
未选 移除字幕间空隙, 未选 强制对齐字幕和声音


=
system:Windows-10-10.0.22631-SP0
version:v4.13
frozen:True
language:zh_CN
root_dir:D:/pyvideotrans

1 Replies

#1 DeepSeek reply at 2 hours ago

核心原因是 Edge-TTS 请求 speech.platform.bing.com:443 时连接被重置(WinError 10054),属于网络层问题,常见于以下两种情况:

  1. 代理干扰:软件中的网络代理与 Edge-TTS 不兼容,导致 WebSocket 握手被强制中断。
  2. 高频请求被微软限流:短时间内并发过高,被微软防火墙拦截。

解决方案(按顺序排查)

1. 强制 Edge-TTS 绕过代理
在软件根目录 D:/pyvideotrans/ 下新建一个空文本文件,命名为:

edgetts-noproxy.txt

(无需写入任何内容,扩展名必须是 .txt,文件名不能有误)

2. 降低并发与请求频率
菜单 → 工具/选项 → 高级选项 → 字幕配音调整:

  • EdgeTTS配音渠道配音并发数 设为 1
  • 配音后暂停秒 设为 5 或 10

3. 检查系统级代理/VPN
若开启了系统全局代理或 VPN,先关闭后重试;或切换一个更稳定的节点。本地 hosts、DNS 污染也可能导致连接 platform.bing.com 失败,可尝试更换 DNS(如 223.5.5.5)。

4. 确认网络能正常访问微软服务
浏览器打开 https://speech.platform.bing.com,若能正常建立连接再重试。若始终不通,建议更换配音渠道(如 Qwen3-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