Tts Router

v0.1.0

Local TTS router for Apple Silicon — pull models, serve OpenAI-compatible API, synthesize speech, clone voices. Use when the user asks to "generate speech",...

0· 301· 1 versions· 1 current· 1 all-time· Updated 10h ago· MIT-0

Install

openclaw skills install tts-router

tts-router — Local TTS Router for Apple Silicon

A CLI that manages and serves multiple TTS models locally on Apple Silicon (MLX). Models are downloaded from HuggingFace Hub and served via OpenAI + DashScope compatible APIs.

Prerequisites

Install

# From PyPI (requires --prerelease=allow due to mlx-audio upstream dep)
uvx --prerelease=allow tts-router list

# Or install with pip
pip install tts-router

Commands

tts-router list — Show available models

tts-router list

tts-router pull <model> — Download model weights

tts-router pull qwen3-tts
tts-router pull kokoro

Models are cached in ~/.cache/huggingface/hub/. No need to re-download.

tts-router serve — Start the TTS API server

# Default: qwen3-tts on port 8091
tts-router serve

# Custom model and port
tts-router serve --model kokoro --port 9000

The server requires models to be pulled first.

tts-router say — Synthesize speech from CLI

tts-router say "Hello world" -o hello.wav
tts-router say "Hello" --voice Vivian --model kokoro -o out.wav

Available Models

Short NameFeatures
qwen3-ttsmulti-speaker, emotion, instruct (default)
qwen3-tts-designfree-form voice description
qwen3-tts-clonevoice cloning with ref audio
kokorofast, lightweight, multi-lang
diamulti-speaker dialogue, laughter/emotion sounds
chatterbox23 languages, emotion control, voice cloning
orpheusemotive TTS with emotion tags

Quick Start for Agent

# 1. Pull the default model
tts-router pull qwen3-tts

# 2. Start the server
tts-router serve

# 3. Generate speech (OpenAI format)
curl -X POST http://localhost:8091/v1/audio/speech \
  -H "Content-Type: application/json" \
  -d '{"input": "Hello world", "voice": "Vivian"}' \
  --output output.wav

API Endpoints (when serving)

EndpointMethodDescription
GET /GETPlayground UI
POST /v1/audio/speechPOSTOpenAI-compatible TTS
GET /v1/audio/voicesGETList available voices
GET /healthGETHealth check
POST /v1/audio/clonePOSTVoice clone generation
POST /v1/audio/references/uploadPOSTUpload reference audio
POST /v1/audio/references/from-urlPOSTFetch ref audio by URL

Advanced Use Cases

For more complex workflows, read the relevant reference file:

  • Clone a voice from any URL (YouTube, Bilibili, podcast, direct audio link) → read references/voice-cloning.md
  • Use tts-router as a TTS provider in OpenClaw → read references/openclaw.md

Version tags

latestvk97744zc9renpadwchayzsb6pn82m9mz