#1194 2025-10-27 22:45:30,010 - VideoTrans - INFO - EdgeTTS ended: [254] subtitle dubbing errors, 0 successes2025-10-27 22:45:

2001:4958* Posted at: 3 days ago 👁14

2025-10-27 22:45:30,010 - VideoTrans - INFO - EdgeTTS ended: [254] subtitle dubbing errors, 0 successes
2025-10-27 22:45:30,110 - VideoTrans - INFO - 开始执行事件循环的关闭流程...
2025-10-27 22:45:30,490 - VideoTrans - INFO - 事件循环已关闭。
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 "videotrans\task\_only_one.py", line 106, in run
File "videotrans\task\trans_create.py", line 422, in dubbing
File "videotrans\task\trans_create.py", line 671, in _tts
File "videotrans\tts\__init__.py", line 246, in run
File "videotrans\tts\_base.py", line 193, 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 1078, in _ws_connect
aiohttp.client_exceptions.WSServerHandshakeError: 401, message='Invalid response status', url='wss://api.msedgeservices.com/tts/cognitiveservices/websocket/v1?Ocp-Apim-Subscription-Key=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=81ec59b6b51d40889fed1d3e42330e4f&Sec-MS-GEC=45B81C547CB8726EA1FCA3C95B560F48550443E4EF3F77C2C4ECA60E56ADFC29&Sec-MS-GEC-Version=1-140.0.3485.14'

1 Replies

这是 Edge-TTS 的认证失败错误(401 状态码),通常是由于请求频率过高导致的服务端限制。请按以下步骤解决:

  1. 降低请求频率

    • 在菜单栏选择 工具/选项 -> 高级选项
    • 在"配音调整"区域:

      • 将"同时配音字幕数"改为 1
      • 将"配音后暂停时间/秒"设为 5 或更高
  2. 如果问题持续

    • 暂时切换到其他 TTS 服务,如 OpenAI TTS 或 Azure TTS(需要配置相应 API 密钥)
    • 等待一段时间后再重试 Edge-TTS
  3. 检查网络环境

    • 确保网络连接稳定
    • 如果使用代理,请在"翻译设置"中配置正确的代理地址

这些调整能有效降低请求频率,避免被微软服务器限制。如果问题依旧,请提供完整的日志文件以便进一步分析。

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