Skip to content

use llama‐swap with tts.cpp

khimaros edited this page Dec 26, 2025 · 1 revision

https://github.com/mmwillet/TTS.cpp

everything seems to work except for the /v1/audi/voices endpoint

macros:
  "home": "/home/user",
  "tts-server": |
      tts-server
      --port ${PORT}

models:
  "kokoro-v1:Q8_0":
    useModelName: "Kokoro_espeak_Q8"
    cmd: |
      ${tts-server}
      --model-path ${home}/src/TTS.cpp/models/Kokoro_espeak_Q8.gguf

testing:

curl http://localhost:7860/upstream/kokoro-v1:Q8_0/v1/audio/voices

curl http://localhost:7860/v1/audio/speech \
    -H "Content-Type: application/json" \
    -d '{
      "input": "This will be converted to speech.",
      "temperature": 0.8,
      "top_k": 20,
      "repetition_penalty": 1.1,
      "response_format": "wav",
      "model": "kokoro-v1:Q8_0"
    }' -s -o - | play -

Clone this wiki locally