#8563 Network connection failed:{'text': 'こんにちは、親愛なる友よ。あなたの日々がいつも素晴らしく、楽しいものでありますように!', 'rate': '+0%', 'role': 'Keita(Male/JP)

5.34**8 Posted at: 1 hour ago

Network connection failed:
{'text': 'こんにちは、親愛なる友よ。あなたの日々がいつも素晴らしく、楽しいものでありますように!', 'rate': '+0%', 'role': 'Keita(Male/JP)', 'filename': 'C:\Users\imobie\AppData\Local\Temp/pyvideotrans/0-1793263472.7927988.wav', 'tts_type': 0, 'language': 'ja', 'volume': '+0%', 'pitch': '+0Hz'}
Traceback (most recent call last):
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: 403, message='Invalid response status', url='wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4&ConnectionId=3dfd8e20defe46358a277d39f8c5a301&Sec-MS-GEC=94B682F58C7DA6A142E71FAE5F4D6FBCCF0BFEF43E8E4306B38A9E9D9FC6DD6E&Sec-MS-GEC-Version=1-143.0.3650.75'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 118, in run
File "videotrans\tts\_base.py", line 92, 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 154, in _exec
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=79246147cb334d438301e0cfb16bb935&Sec-MS-GEC=94B682F58C7DA6A142E71FAE5F4D6FBCCF0BFEF43E8E4306B38A9E9D9FC6DD6E&Sec-MS-GEC-Version=1-143.0.3650.75'


=
system:Windows-10-10.0.19045-SP0
version:v4.13
frozen:True
language:zh_CN
root_dir:F:/语音转文字/win-pyvideotrans-v4.13-1

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因是:你使用的 v4.13 版本中 Edge-TTS 依赖的旧版微软接口验证逻辑已失效,微软端返回 403 Invalid response status,属于版本已知问题,非网络本身故障。

解决方案(按优先级):

  1. 升级软件至 v4.16 或最新版(必须)

    • 去官网下载完整包或最新补丁包,完整覆盖到旧目录(含 sp.exe、_internal、videotrans 文件夹)。
    • v4.16 更新日志明确修复了 Edge-TTS 403 问题。
    • 覆盖前建议先删除旧目录中所有 __pycache__ 文件夹,避免缓存冲突。
  2. 临时替代方案:在配音渠道中换用其他渠道先完成任务,例如:

    • gTTS(免费)(国内需科学上网,音质一般)
    • 内置 Qwen3-TTS / F5-TTS / OmniVoice 等(首次需下载模型)
  3. 若为源码部署(非你当前的 frozen 打包版),执行:

    uv add git+https://github.com/rany2/edge-tts.git

    若出错,先 uv remove edge-tts 再重新执行上述命令。

附带建议:你的安装路径 F:/语音转文字/win-pyvideotrans-v4.13-1 含中文,建议改为纯英文数字简短路径(如 D:\pyVideoTrans),以避免其他 FFmpeg/模型加载类报错。

请查阅相关文档:

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