Kokoro-82M (Node CPU, 54 voices)
Install the optional Apache-2.0 ONNX runtime package once. Model weights download automatically on first call.
npm install voxloom kokoro-js
npx voxloom speak "Hello studio." --voice af_heart --out hello.wav
Everything needed to run VoxLoom locally in Node 20+, serve OpenAI-compatible speech endpoints, configure native Turkish Piper models, or connect AI agents over MCP stdio.
POST /v1/audio/speech HTTP/1.1
# Response mastering headers
X-VoxLoom-Voice: tr_fahrettin
X-VoxLoom-Lufs: -16.0
X-VoxLoom-Peak-Db: -1.0
X-VoxLoom-Backend: piper
Start with npx voxloom serve --port 8880. Every audio response returns real mastering telemetry headers alongside the WAV or PCM16 payload.
| Endpoint | Payload / Query | Behavior & Telemetry |
|---|---|---|
POST /v1/audio/speech |
{ model, input, voice, speed, response_format, lang, master, dialogue } |
Returns mastered audio/wav or audio/pcm plus headers X-VoxLoom-Lufs, X-VoxLoom-Peak-Db, X-VoxLoom-Voice, and X-VoxLoom-Elapsed-Ms. |
GET /v1/voices |
?lang=tr&backend=piper&webgpu=true |
Lists matching open-weight voices (66 total) plus the openaiAliases map (alloy, nova, shimmer, onyx, echo, fable). |
POST /v1/normalize |
{ input, lang } |
Runs offline spoken-text normalization and prosody chunking without loading neural model weights. |
GET /health |
None | Returns service status, package version, and registered catalog count for container health checks. |
VoxLoom separates spoken-text prosody and audio mastering from neural inference so you can pair any open-weight backend cleanly.
Install the optional Apache-2.0 ONNX runtime package once. Model weights download automatically on first call.
npm install voxloom kokoro-js
npx voxloom speak "Hello studio." --voice af_heart --out hello.wav
Download tr_TR-fahrettin-medium.onnx and its .onnx.json from rhasspy/piper-voices into ./models and run:
export VOXLOOM_PIPER_DIR=./models
npx voxloom speak "Saat 14:30 için ₺250 hazır." --lang tr --out tr.wav
Forward synthesis to any OpenAI-compatible local GPU server while keeping VoxLoom normalization and -16 LUFS mastering:
npx voxloom speak "Studio master check." \
--openai-url http://127.0.0.1:8000/v1 \
--out gpu-mastered.wav
Feed incremental tokens directly from an LLM stream and synthesize each completed sentence without waiting for the full reply:
import { createStreamingChunker } from "voxloom";
const chunker = createStreamingChunker();
for await (const token of llmStream) {
for (const chunk of chunker.push(token)) {
await enqueueSpeech(chunk.text);
}
}
Every core capability is available both from your shell and over newline-delimited JSON-RPC 2.0 via voxloom mcp.
| CLI Command / MCP Tool | Purpose | Key Options |
|---|---|---|
voxloom speak / speak_text |
Synthesize normalized, -16 LUFS mastered WAV speech. | --voice, --lang, --speed, --out, --no-master |
voxloom dialogue / synthesize_dialogue |
Render multi-speaker [Speaker]: ... scripts with turn pauses. |
--voices Host=af_heart,Guest=am_michael |
voxloom normalize / normalize_speech |
Expand Turkish and English numbers, currencies, dates, and URLs offline. | --lang tr|en|auto, --json |
voxloom voices / list_voices |
Inspect all 66 open-weight voices and WebGPU readiness. | --lang, --backend kokoro|piper, --json |
voxloom serve |
Start the local OpenAI-compatible /v1/audio/speech HTTP server. |
--port 8880, --host 127.0.0.1, --openai-url |
voxloom mcp |
Run the Model Context Protocol JSON-RPC 2.0 stdio server for AI agents. | --piper-dir, --openai-url |