#4907 requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: http://http/v1/audio/speech

95.85* Posted at: 17 hours ago

502 Server Error: Bad Gateway for url: http://http/v1/audio/speech:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 184, in run
File "videotrans\tts\_base.py", line 134, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_kokoro.py", line 30, in _run
File "requests\models.py", line 1026, in raise_for_status
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: http://http/v1/audio/speech


=
system:Windows-10-10.0.19045-SP0
version:v4.01
frozen:True
language:zh
root_dir:A:/BaiduNetdiskDownload/py

1 Replies

错误原因是 Kokoro TTS 服务的 API 地址配置错误。日志中 URL 为 http://http/v1/audio/speech,格式显然不对(出现了重复的 http:// 且缺少主机和端口),导致网关错误(502)。

解决方案:

  1. 确保 Kokoro TTS 服务已启动:在本地运行 Kokoro TTS 的 API 服务(需保持终端窗口打开)。
  2. 核实 API 地址:在 菜单 → TTS设置 → Kokoro TTS 中,正确地填写地址,格式示例:http://127.0.0.1:7860/v1/audio/speech(端口号根据自己的实际部署填写)。
  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. Dondate: ko-fi.com/jianchang512

Related resource

Similar issues already exist