#7714 系统错误 (10054):远程主机强迫关闭了一个现有的连接。:{'text': 'Hello, my dear friend. I hope your every day is beautiful and enjoyable!', 'rat

2408**823f Posted at: 1 hour ago

系统错误 (10054):远程主机强迫关闭了一个现有的连接。:
{'text': 'Hello, my dear friend. I hope your every day is beautiful and enjoyable!', 'rate': '+0%', 'role': 'Ryan(Male/GB)', 'filename': 'C:\Users\Administrator\AppData\Local\Temp/pyvideotrans/0-1790737172.6081333.wav', 'tts_type': 0, 'language': 'en', 'volume': '+60%', 'pitch': '+0Hz'}
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\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 233, in run
File "videotrans\tts\_base.py", line 100, in run
File "asyncio\runners.py", line 44, in run
File "asyncio\base_events.py", line 649, in run_until_complete
File "videotrans\tts\_edgetts.py", line 152, in _exec
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 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: [远程主机强迫关闭了一个现有的连接。]


=
system:Windows-10-10.0.26100-SP0
version:v4.10
frozen:True
language:zh
root_dir:E:/pyVideoTranss

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 Edge-TTS(免费在线接口)与微软服务器连接被强制中断导致的,核心原因是网络层问题(代理配置错误、节点被墙或微软限流),并非软件本身缺陷。

解决方案(按优先级排查):

  1. 检查代理设置:主界面 对齐控制(Alignment) 行右侧的代理文本框,若你并未开启代理服务,请清空该框。

    填写了无效的代理地址会导致 Edge-TTS 所有请求失败。

    正确格式为 http://127.0.0.1:端口号。

  2. 绕过代理:在软件根目录(E:/pyVideoTranss)新建一个空文本文件,命名为 edgetts-noproxy.txt,强制 Edge-TTS 绕过代理直连。

  3. 降低并发、增加间隔(微软对高频请求会临时封 IP):

    • 菜单 → 工具/选项 → 高级选项 → 字幕配音调整
    • 将 EdgeTTS配音渠道配音并发数 设为 1
    • 将 配音后暂停秒 设为 5~10
  4. 切换网络环境:你的系统为 Windows 10,若使用 VPN,请切换节点(当前节点 IP 可能被微软标记);或直接断掉 VPN 直连测试。

  5. 更换配音渠道:若以上均无效,可临时切换为 gTTS(免费),或使用 Qwen3-TTS(内置) 等本地渠道。

    注意 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