SuperTonic3

Local text-to-speech with 31 languages & 10 built-in voices

Server v{{ versions.server }} · supertonic3 v{{ versions.supertonic3 }}

API Documentation

OpenAI-compatible TTS API. Use any OpenAI TTS client by pointing it to this server.

GET /health

Health check endpoint for container orchestration and monitoring.

Response:
{
  "status": "healthy",
  "model_loaded": true,
  "sample_rate": 44100
}
GET /v1/voices

List all available built-in voices.

Response:
{
  "object": "list",
  "data": [
    {"id": "M1", "name": "M1", "object": "voice", "type": "builtin"},
    {"id": "F1", "name": "F1", "object": "voice", "type": "builtin"}
  ]
}
POST /v1/audio/speech

Generate speech audio from text. OpenAI-compatible endpoint.

Request Body (JSON):
Parameter Type Required Default Description
input string - The text to generate speech from
voice string M1 Voice ID. See /v1/voices
model string - Ignored (for OpenAI compatibility)
response_format string mp3 Audio format: mp3, opus, aac, flac, wav, pcm
stream boolean false Enable streaming response
lang string en Language code for pronunciation
Example Request (curl):
curl -X POST http://localhost:7860/v1/audio/speech \
  -H "Content-Type: application/json" \
  -d '{
    "input": "Hello world!",
    "voice": "M1",
    "response_format": "mp3"
  }' \
  --output speech.mp3
Example (Python with OpenAI client):
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:7860/v1",
    api_key="not-needed"
)

response = client.audio.speech.create(
    model="tts-1",
    voice="M1",
    input="Hello world!"
)
response.stream_to_file("output.mp3")
Response:

Audio file in the requested format (binary stream).

Content-Type: audio/mpeg, audio/wav, audio/opus, etc.

Error Response:
{
  "error": "Missing required field: input"
}

Built-in Voices

10 voices available: M1-M5 (male), F1-F5 (female)

M1 M2 M3 M4 M5 F1 F2 F3 F4 F5