Skip to content

Chatterbox-TTS Server Returns 404 When Connected to Open WebUI (Docker Setup) #133

Description

@connectnet

Hi everyone,

I’m trying to integrate Chatterbox-TTS (by @devnen) with Open WebUI in a Docker environment, but I’m running into a 404 Not Found error when Open WebUI attempts to connect to the TTS server. Here’s what I’ve tried so far:


Setup

  • Chatterbox-TTS Server:
    • Running in Docker on port 8004 (exposed to 0.0.0.0).
    • Confirmed working via curl (see below).
  • Open WebUI:
    • Also running in Docker, configured to use Chatterbox as the TTS provider.
    • Both containers are on the same Docker network (bridge by default).

Steps Taken

  1. Verified Chatterbox is running:

    curl -X POST http://localhost:8004/v1/audio/speech \
      -H "Content-Type: application/json" \
      -d '{"model": "tts-1", "input": "Test", "voice": "alloy"}'
    • Response: Returns audio data (works as expected).
  2. Configured Open WebUI:

    • TTS provider set to "Custom API".
    • URL: http://chatterbox:8004/v1/audio/speech (using Docker service name).
    • HTTP method: POST.
    • JSON body:
      {
        "model": "tts-1",
        "input": "{{text}}",
        "voice": "alloy"
      }
  3. Tested connection from Open WebUI:

    • Open WebUI logs show a 404 error when attempting to send TTS requests.

Error Details

  • Open WebUI Logs:
    ERROR: TTS request failed with status 404
    
  • Chatterbox Logs (no errors, but no incoming requests either):
    INFO:     172.17.0.1:8004- "POST /v1/audio/speech HTTP/1.1" 404 Not Found
    

Possible Causes

  1. Incorrect API Endpoint:

    • Is /v1/audio/speech the correct path for Chatterbox? The docs are unclear.
    • Tried /synthesize and /tts as alternatives, but same 404.
  2. Docker Networking Issue:

    • Both containers are on the same network, but Open WebUI might not resolve chatterbox:8004 correctly.
    • Tested with curl from inside the Open WebUI container:
      docker exec -it openwebui curl -v http://chatterbox:8004/v1/audio/speech
      • Returns 404, but curl http://localhost:8004/v1/audio/speech (from host) works.
  3. Missing Headers/Authentication:

    • Chatterbox doesn’t require an API key, but Open WebUI might send extra headers causing issues.

Questions

  1. What is the correct API endpoint for Chatterbox-TTS?

    • The OpenAI-compatible /v1/audio/speech works with curl, but not from Open WebUI.
    • Are there other paths (e.g., /synthesize)?
  2. Is there a known issue with Docker networking?

    • Why does curl from the host work, but not from the Open WebUI container?
  3. Does Chatterbox expect specific headers or payload formats?

    • The 404 suggests the endpoint exists but rejects the request.

Request for Help

If anyone has successfully integrated Chatterbox-TTS with Open WebUI (or another frontend), I’d appreciate guidance on:

  • The correct API endpoint/path.
  • Docker networking tweaks (e.g., custom networks, hostnames).
  • Debugging steps to trace the 404 error.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions