#4776 requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:7860/tts

47.82* Posted at: 1 day ago

404 Client Error: Not Found for url: http://127.0.0.1:7860/tts:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 379, in run
File "videotrans\tts\_base.py", line 181, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_chattts.py", line 43, in _run
File "requests\models.py", line 1026, in raise_for_status
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:7860/tts


=
system:Windows-10-10.0.26100-SP0
version:v3.99
frozen:True
language:zh
root_dir:F:/SPPY/win-pyvideotrans-v3.99-428

1 Replies

该错误提示表明无法连接到配音服务 http://127.0.0.1:7860/tts,返回 404 Not Found,说明服务地址或路径配置错误,或者服务本身未正确启动。

原因与解决:

  1. 服务未运行或端口不对:请在终端检查您使用的本地 TTS 服务(如 ChatTTS、F5-TTS、CosyVoice 等)的窗口是否仍在运行,确认监听端口是否为 7860

    • 若服务使用了其他端口(例如 9876),请在软件菜单 TTS设置 → 对应渠道中修改 API 地址。
  2. API 路径不正确/tts 路径不一定正确。不同 TTS 项目的 API 端点不同,常见的有:

    • ChatTTS:/run/generate
    • F5-TTS:/v1/tts/generate_voice
    • GPT-SoVITS:/tts/v1/tts(且需根据版本勾选 api_v2
    • 请查阅您所用 TTS 项目的说明文档,在软件设置中将地址填写为完整正确的 URL。
  3. 验证方法:在浏览器中打开 http://127.0.0.1:7860/docshttp://127.0.0.1:7860/,看是否显示 Swagger 文档或页面;若有,即可查看支持的 API 路径。

请修正设置后重试;若问题依旧,请提供具体使用的 TTS 渠道名称及 logs/ 目录下的日志文件(末尾 30 行)。

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

Similar issues already exist