OpenAI-compatible TTS API powered by VibeVoice (long-form, multi-speaker)
1.0K
tomorsogody/vibevoice-apiA ready-to-run, OpenAI-compatible text-to-speech server powered by VibeVoice (long-form, multi-speaker TTS). The image is public on Docker Hub — no login needed:
docker pull tomorsogody/vibevoice-api:latest
Point any OpenAI TTS client at it by changing the base_url.
--gpus all support), or
a rented GPU on Vast.ai / RunPod / Lambda / any GPU host.docker run --gpus all -p 8000:8000 \
-e VV_API_KEY=choose-a-secret \
-e VV_DEFAULT_MODEL=vibevoice-1.5b \
-v vv-cache:/cache/huggingface \
tomorsogody/vibevoice-api:latest
VV_API_KEY — clients must send Authorization: Bearer <this>. Leave it
unset and auth is OFF (open to anyone who can reach the port).-v vv-cache:/cache/huggingface — persists downloaded weights across restarts./v1/audio/speech call is slow (weight download); everything after is fast.Check it's up:
curl http://localhost:8000/health # {"status":"ok","engine":"vibevoice"}
tomorsogody/vibevoice-api:latest8000-p 8000:8000 -e VV_API_KEY=secret -e VV_DEFAULT_MODEL=vibevoice-1.5b -e HF_HOME=/cache/huggingfacecd /app && nohup uvicorn app.main:app --host 0.0.0.0 --port 8000 > /var/log/vibevoice.log 2>&1 &IP:PORT for container port 8000.Full walkthrough: docs/VASTAI.md.
from openai import OpenAI
client = OpenAI(base_url="http://YOUR_HOST:8000/v1", api_key="choose-a-secret")
client.audio.speech.create(
model="vibevoice-1.5b", # or "vibevoice-7b"
voice="alice", # see /v1/voices
input="Hello from VibeVoice!",
).stream_to_file("hello.mp3")
curl -X POST http://YOUR_HOST:8000/v1/audio/speech \
-H "Authorization: Bearer choose-a-secret" \
-H "Content-Type: application/json" \
-d '{"model":"vibevoice-1.5b","voice":"alice","input":"Hello there.","response_format":"mp3"}' \
--output hello.mp3
import OpenAI from "openai";
import fs from "fs";
const client = new OpenAI({ baseURL: "http://YOUR_HOST:8000/v1", apiKey: "choose-a-secret" });
const res = await client.audio.speech.create({ model: "vibevoice-1.5b", voice: "alice", input: "Hi!" });
fs.writeFileSync("hi.mp3", Buffer.from(await res.arrayBuffer()));
| Method | Path | Purpose |
|---|---|---|
POST | /v1/audio/speech | Generate speech (OpenAI-compatible) |
GET | /v1/models | List models |
GET | /v1/voices | List available voices |
POST | /v1/voices | Upload a reference WAV to clone a new voice |
GET | /health | Liveness (no auth) |
/v1/audio/speech body:
| Field | Values | Notes |
|---|---|---|
model | vibevoice-1.5b, vibevoice-7b (aliases tts-1, tts-1-hd) | Or a raw HF repo id |
input | text | Add Speaker 1: / Speaker 2: lines for multi-speaker |
voice | alice, carter, frank, maya, mary, samuel, bowen, anchen, xinran | OpenAI names (alloy, nova, echo, …) alias onto these. Comma-separate for multi-speaker: "frank,maya" |
response_format | mp3 (default), opus, aac, flac, wav, pcm | |
speed | 0.25–4.0 | |
cfg_scale | float (default 1.3) | Extension: guidance strength |
{
"model": "vibevoice-1.5b",
"voice": "frank,maya",
"input": "Speaker 1: Welcome to the show!\nSpeaker 2: Great to be here.",
"response_format": "mp3"
}
Speaker 1 → first voice, Speaker 2 → second, up to 4 speakers.
VibeVoice has no [laugh]/[sigh] tags. Write cues phonetically in the
text — "Ha ha ha!", "Ugh…", "Whoa!" — and its emergent expressiveness
handles laughter/emotion naturally. Bracketed tags may be read literally.
Measured on a single RTX 3060 12 GB (1.5B model):
words ÷ 4 seconds; compute ≈ 0.75 × audio length.VV_API_KEY is a single static bearer token — the only built-in auth.
Unset = no auth. Rotate it if it leaks.VV_-prefixed)VV_ENGINE (vibevoice/mock), VV_API_KEY, VV_DEFAULT_MODEL,
VV_MAX_LOADED_MODELS, VV_ATTN_IMPL (auto/sdpa/flash_attention_2),
VV_CFG_SCALE, VV_MAX_CONCURRENCY, VV_REQUEST_TIMEOUT_S, VV_DEFAULT_VOICE.
Full list: .env.example.
Tip:
VV_ENGINE=mockruns with no GPU and returns a synthetic tone — handy for testing your client integration on a laptop before renting a GPU.
Source & Dockerfile: https://github.com/ttomor/vibevoice-api · Model & license: VibeVoice (MIT).
Content type
Image
Digest
sha256:658380d2b…
Size
4.6 GB
Last updated
3 months ago
docker pull tomorsogody/vibevoice-api