#1015 aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host api.msedgeservices.com:443 ssl:True [S

111.118* Posted at: 1 day ago 👁124

系统错误 (None):None:
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\connector.py", line 1263, in _wrap_create_connection
File "asyncio\base_events.py", line 1089, in create_connection
File "asyncio\base_events.py", line 1119, in _create_connection_transport
File "asyncio\sslproto.py", line 534, in data_received
File "asyncio\sslproto.py", line 188, in feed_ssldata
File "ssl.py", line 974, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)

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

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 248, in run
File "videotrans\tts\_base.py", line 182, in run
File "videotrans\tts\_edgetts.py", line 70, 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 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 1265, in _wrap_create_connection
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host api.msedgeservices.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)')]

=====
Windows-10-10.0.19045-SP0
version:v3.81
frozen:True
language:zh

6 Replies

浏览器也报证书过期/不信任,安装所有重要更新以更新根证书链以后依然报错

o https://api.msedgeservices.com esta realmente sem o ssl , Agora utilizei o open.ai tts , e ainda esta dando erro , eo hora do meu computador esta correto

Admin

You can see it by opening it in the browser. The certificate expires today.
Can only wait for Microsoft to update the certificate

Admin

Solution for source code deployment: Open the file virtualenv/Lib/site-packages/edge_tts/communicate.py, line 442, and change ssl=ssl_ctx to ssl=False. This will temporarily resolve the issue.

não encontrei esse diretório - virtualenv/Lib/site-packages/edge_tts/communicate.py

本条内容由 DeepSeek 回复

这是 Edge-TTS 服务端 SSL 证书过期导致的连接问题。根据开发者回复,这是微软服务器证书在今天过期造成的。

解决方案:

  1. 临时解决方案(推荐): 切换到其他 TTS 配音渠道。

    • 在菜单栏选择 TTS配音设置
    • 将配音渠道改为 OpenAI TTSAzure TTS 或其他可用的 TTS 服务
    • 配置相应的 API 密钥后即可正常使用
  2. 源码部署用户: 如您是源码部署,可按照开发者建议修改 edge_tts 源码:

    • 找到文件:virtualenv/Lib/site-packages/edge_tts/communicate.py
    • 在第 442 行附近,将 ssl=ssl_ctx 改为 ssl=False
  3. 预打包版用户: 由于您使用的是预打包版本,无法直接修改内部文件,建议采用第一种方案切换 TTS 渠道。

这个问题需要等待微软更新其服务器证书才能完全解决,目前建议使用其他 TTS 服务作为替代方案。

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions