#3463 RuntimeError: WebSocket upgrade failed: Authentication error (401). Please check subscription information and region nam

182.35* Posted at: 20 hours ago 👁14

WebSocket upgrade failed: Authentication error (401). Please check subscription information and region name. USP state: Sending. Received audio size: 0 bytes.:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 320, in run
File "videotrans\tts\_base.py", line 178, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_azuretts.py", line 148, in _run
RuntimeError: WebSocket upgrade failed: Authentication error (401). Please check subscription information and region name. USP state: Sending. Received audio size: 0 bytes.


=
system:Windows-10-10.0.19045-SP0
version:v3.97
frozen:True
language:zh
root_dir:D:/AI/win-pyvideotrans-v3.97-0304

1 Replies

这是由于 Azure TTS 的订阅密钥或区域名称配置错误导致的认证失败。

  1. 检查 Azure TTS 配置

    • 在软件主界面“配音渠道”中选择“AzureTTS”。
    • 点击“设置”按钮,确保“密钥”和“区域”填写正确。
    • “密钥”必须是有效的 Azure 语音服务订阅密钥。
    • “区域”必须与创建该密钥的 Azure 区域完全一致(例如 eastus)。
  2. 验证 Azure 资源

    • 登录 Azure 门户,确认你的语音服务资源处于“已启用”状态,且订阅密钥有效。
  3. 调整高级设置

    • 前往“菜单 -> 工具 -> 高级选项 -> 字幕配音调整”。
    • 尝试将“AzureTTS批量行数”从默认值 100 调小(例如设为 105),以降低单次请求负载。

请查阅相关文档:

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.

Related resource