Skip to content

v0.1.0 — OpenAI-compatible server for Supertonic-3

Choose a tag to compare

@ARahim3 ARahim3 released this 15 May 22:34

v0.1.0 — OpenAI-compatible server for Supertonic-3

supertonic-server is a drop-in local replacement for OpenAI's /v1/audio/speech endpoint, powered by the Supertonic-3 on-device TTS model. Point any OpenAI-TTS-compatible client — the OpenAI SDK, Pipecat, LiveKit Agents, OpenWebUI, Continue.dev — at http://localhost:8000/v1 and you're done.

Highlights

  • 🎙️ OpenAI-compatible POST /v1/audio/speech, GET /v1/voices, GET /v1/models, GET /healthz.
  • Streaming by default — sentence-level chunks over HTTP/1.1 chunked transfer. First audio byte typically lands in ~450–650 ms on an M-series Mac.
  • 🧠 Cross-platform acceleration--device auto picks CUDA → CoreML → CPU based on what's available. Same wheel, every OS.
  • 🌍 31 languages (en, ko, ja, ar, bg, cs, da, de, el, es, et, fi, fr, hi, hr, hu, id, it, lt, lv, nl, pl, pt, ro, ru, sk, sl, sv, tr, uk, vi) + a fallback code.
  • 🗣️ 10 built-in voices (F1–F5, M1–M5) plus all 13 OpenAI voice aliases (alloy, nova, echo, onyx, shimmer, …) mapped automatically so existing clients work zero-config.
  • 🔥 Warmup on startup so the first real request doesn't pay the CoreML/CUDA graph-compile tax.
  • 🐳 Dockerfile (CPU default, with 3-line instructions to swap to CUDA).
  • 📦 ~16 KB pure-Python wheel — the heavy lifting is onnxruntime and the upstream supertonic SDK.

Install

pip install supertonic-server
# or:
uv pip install supertonic-server

30-second quick start

supertonic-server --port 8000

curl -X POST http://localhost:8000/v1/audio/speech \
  -H 'Content-Type: application/json' \
  -d '{"input":"Hello, world.","voice":"alloy","response_format":"mp3"}' \
  --output hello.mp3

From Python (OpenAI SDK):

from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="not-needed")
client.audio.speech.create(model="supertonic-3", voice="nova",
                           input="Local TTS, OpenAI API.").stream_to_file("nova.mp3")

Compatibility

Supported
Python 3.11, 3.12, 3.13
OS macOS (incl. Apple Silicon), Linux, Windows
Hardware CPU; CoreML (Apple Silicon); CUDA (via onnxruntime-gpu)
Audio formats mp3, wav, pcm
Sample rate 44 100 Hz mono int16
Tested with OpenAI Python SDK, Pipecat 1.2, LiveKit openai.TTS

Known limitations

  • Streaming granularity is per sentence (the diffusion vocoder runs once per chunk). Sub-sentence streaming is not possible without model changes.
  • Output formats are MP3 / WAV / PCM only. Opus / AAC / FLAC are on the roadmap.
  • No runtime voice cloning — use Supertone's separate Voice Builder for that.

Links

Acknowledgements

Built on the excellent work of the Supertone team. License: MIT (server code) + OpenRAIL-M (model weights).