#8500 网络连接失败:Traceback (most recent call last):

117.189**2 Posted at: 2 hours ago

网络连接失败:
Traceback (most recent call last):
File "videotrans\tts\_base.py", line 125, in run
RuntimeError: no running event loop

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 17, in run
File "videotrans\tts\__init__.py", line 325, in run
File "videotrans\tts\_base.py", line 176, in run
File "videotrans\tts\_edgetts.py", line 68, 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=35b4daffe9194242bbce4b39a64b4997&Sec-MS-GEC=A2E599D21DF8959AB662F9628F7E7950434848D51EE2133CC0A547FEAD87C4B2&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.26200-SP0
version:v3.96
frozen:True
language:zh
root_dir:D:/BaiduNetdiskDownload/BaiduNetdiskDownload/win-pyvideotrans-v3.96

1 Replies

#1 DeepSeek reply at 2 hours ago

这是 Edge-TTS 免费接口返回 403 拒绝访问,微软已更改了接口验证逻辑,而您当前使用的是 v3.96 老版本(软件版本号 version:v3.96),该版本的 Edge-TTS 调用方式已失效,属于已知问题,v4.16 已修复。

解决方案

  1. 升级到最新完整版:前往 https://pyvideotrans.com/downpackage 下载最新完整包(约 2.6GB,注意不要只下 260MB 的补丁包),解压覆盖到新目录(如 D:\pyvideotrans),参考您现有的 params.json 和 cfg.json 配置文件可复制过去保留设置。
  2. 若不想升级,改用其他配音渠道:在主界面「配音渠道」中选择 gTTS(免费)(国内需科学上网),或使用 Qwen3-TTS(内置)、fish.audio 等替代渠道。
  3. 若已升级 v4.16 仍报 403:源码部署用户需执行 uv add git+https://github.com/rany2/edge-tts.git(若报错先 uv remove edge-tts);同时建议在 高级选项 → 字幕配音调整 中将 EdgeTTS配音渠道配音并发数 设为 1,配音后暂停秒 设为 5-10,避免高频请求被微软限流。
  4. 代理相关:若您开了代理,可在软件根目录(D:/BaiduNetdiskDownload/BaiduNetdiskDownload/win-pyvideotrans-v3.96/)下创建空文件 edgetts-noproxy.txt,强制 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