ortts is an OpenAI-compatible server offering text-to-speech services.
You can always access the integrated Scalar OpenAPI documentation at http://127.0.0.1:12775.
git clone https://github.com/moeru-ai/ortts.git
cd ortts
cargo run serve --releaseOn Linux, Pixi installs the CUDA 12 runtime and development libraries expected by ONNX Runtime before starting the server:
pixi install
pixi run serveQwen3-TTS Base uses the voice field as a local reference-audio path. Select a language with
qwen3-tts-base:zh, qwen3-tts-base:en, or qwen3-tts-base:ja:
curl -X POST \
-H 'Content-Type: application/json' \
-d '{ "voice": "/path/to/reference.wav", "input": "こんにちは、世界!", "model": "qwen3-tts-base:ja" }' \
--output qwen3-tts.wav \
"http://127.0.0.1:12775/v1/audio/speech"docker run -d --restart always \
-p 12775:12775 \
ghcr.io/moeru-ai/ortts:latestOr if you have existing cache directory with models downloaded or would love to reuse cache across restarts:
docker run -d --restart always \
-p 12775:12775 \
-v ~/.cache/huggingface/hub:/root/.cache/huggingface/hub \
ghcr.io/moeru-ai/ortts:latestcurl -X POST \
-H 'Content-Type: application/json' \
-d '{ "voice": "/path/to/reference/voice/audio/file", "input": "This is a test", "model": "chatterbox-multilingual" }' \
--output test.wav \
"http://127.0.0.1:12775/v1/audio/speech"