Text-to-speech model
Kokoro TTS, self-hosted: one cheap card, 4GB of VRAM, dozens of times realtime
Kokoro-82M is the smallest front-line open TTS model there is: 82 million parameters, Apache 2.0 weights, 24kHz output, 54 voices across 9 language codes. It does not need an A100. It needs a cheap card you can switch off.
Kokoro · self-hosted
Kokoro comes from hexgrad (@rzvzn on Discord), built on StyleTTS 2 and ISTFTNet with a decoder-only release and no diffusion stage. The mainline v1.0 weights were frozen in January 2025 with SHA256 prefix 496dba11, and the pip package settled at 0.9.4 — this is not a project that changes its calling convention every two weeks. The whole v1.0 run burned roughly 500 A100 80GB GPU-hours on a few hundred hours of public-domain audio, Apache/MIT-licensed audio, and synthetic data from closed commercial TTS engines. That provenance is exactly why the weights can ship under Apache 2.0.
82 million parameters means 326MB of fp32 weights, and 86MB once quantized to ONNX q8f16. In practice, counting PyTorch and the CUDA context, a single instance sits between 2.37GB and 3.98GB of VRAM — that range is measured, not estimated: Kokoro-FastAPI reports it while narrating the full text of The Time Machine on a 4060Ti 16GB. So one 24GB card can hold Kokoro, a Whisper ASR worker and a 7B chat model at the same time, which is wishful thinking with XTTS or F5-TTS. On the same 4060Ti the realtime factor lands between 35x and 100x, streaming first-token latency around 300ms, throughput around 138 tokens/s.
Now the costs. Kokoro does not clone voices: a voice is one of 54 pretrained style vectors, each a 523KB .pt file that is exactly a 510×256 fp32 lookup table. You can blend them by weight, but with no encoder weights released you cannot mint a new speaker from thirty seconds of audio. Language is the other hard edge — American and British English, Spanish, French, Hindi, Italian, Japanese, Brazilian Portuguese and Mandarin, and that is the list. German, Russian, Turkish and Vietnamese requests have been open in the repo for over a year; the busiest German thread has 77 comments and still no weights. Accept those two limits and the rest is just picking a cheap enough GPU.
01 —
What you can actually download today
One mainline branch, four deployment shapes, and nearly a 4x spread in file size across quantizations
| Version | Parameters | VRAM | Context | Notes |
|---|---|---|---|---|
| hexgrad/Kokoro-82M v1.0 | 82M | 326MB fp32 weights / 2.4–4.0GB resident per instance | 510 phoneme tokens per segment | The mainline weights, unchanged since January 2025. 54 voices, 9 language codes (a/b/e/f/h/i/j/p/z), fixed 24kHz mono output. Start here; there is no reason to detour. |
| hexgrad/Kokoro-82M-v1.1-zh | 82M | Identical to v1.0 — no difference in footprint | 510 phoneme tokens per segment | The Mandarin-focused branch. LongMaoData donated 100 hours of professional Chinese recordings and it took only 120 A100 GPU-hours to train. Around 103 voices, but it drops many of v1.0's English voices — the card itself says it is "not a strict upgrade". Worth it for pure Chinese narration. |
| onnx-community/Kokoro-82M-v1.0-ONNX | 82M | fp16 163MB / int8 92.4MB / q8f16 86MB | 510 phoneme tokens per segment | The community ONNX export, shipping eight precisions side by side: fp32 326MB, q4f16 155MB, uint8 177MB, uint8f16 114MB. This is the path for CPU inference, browser WASM and edge boxes. Note the DirectML execution provider still has open errors. |
| kokoro-onnx (thewh1teagle) | 82M | kokoro-v1.0.onnx ~300MB + voices-v1.0.bin | 510 phoneme tokens per segment | An MIT-licensed minimal Python wrapper: two files and you are running, near realtime on Apple Silicon. The easiest option when you do not want the whole torch stack inside a container. |
| Kokoro v0.19 / hexgrad/kLegacy | 82M | Same architecture, no separate optimization | 510 phoneme tokens per segment | The pre-misaki G2P generation, archived in the kLegacy repo. Voice names and the calling interface are both incompatible with v1.0 — only touch it to keep a legacy project alive. |
02 —
Which card to rent
VRAM was never Kokoro's bottleneck — first-token latency and concurrency are
Keeping an OpenAI-compatible TTS endpoint online
RTX 3090 24GB$0.193/GPU-hour
One instance tops out around 4GB, so 24GB lets you run six or seven workers side by side, or bolt a Whisper ASR onto the same card.
Realtime conversational streaming where first-token latency rules
RTX 4090 24GB$0.540/GPU-hour
Single-stream latency on a small model tracks clock speed and memory bandwidth, not tensor throughput; first token stays in the 300ms range at 400-character chunks.
Batch offline synthesis for audiobooks, podcasts and courseware
Tesla T4 16GB$0.298/GPU-hour
Batch jobs do not care about latency, and 16GB is luxurious for an 82M model. Per-second billing means a whole book costs pennies and the meter stops when you do.
Reproducing the official training run or attempting a finetune
A100 PCIE 80GB$0.824/GPU-hour
v1.1-zh took 120 A100 80GB hours and v1.0 about 500 — one of the very few TTS training budgets you can price out before you start.
03 —
Four steps to running
The espeak-ng step is where nine out of ten people get stuck — install it first
- 01
Boot an RTX 3090 and confirm CUDA is live
Pick a PyTorch prebuilt image in the console and connect over SSH, Jupyter or the web terminal. Kokoro is not fussy about the torch version, but Python must be 3.10 to 3.12 — the kokoro package pins requires-python to >=3.10,<3.13, and a 3.13 environment simply will not resolve.
python -c "import sys, torch; print(sys.version, torch.__version__, torch.cuda.is_available())" - 02
Install espeak-ng, then kokoro
misaki handles grapheme-to-phoneme conversion and falls back to espeak-ng for out-of-vocabulary words, so this is a hard system dependency, not an optional extra — without it the pipeline errors on startup. Mandarin additionally needs misaki[zh] (pypinyin + jieba); Japanese needs misaki[ja]. On Windows you also have to install the .msi and set PHONEMIZER_ESPEAK_LIBRARY, which is a good argument for just renting a Linux box.
apt-get update && apt-get install -y espeak-ng && pip install "kokoro>=0.9.4" "misaki[zh]" soundfile - 03
Synthesize your first clip
KPipeline picks its G2P backend from lang_code, and the voice must match: language code z takes a zf_/zm_ voice, and mixing them yields audio that is intelligible but strangely accented. The call returns a generator that yields graphemes, phonemes and a 24kHz waveform per segment. To use the Mandarin branch instead, pass repo_id='hexgrad/Kokoro-82M-v1.1-zh' to the constructor.
python -c "from kokoro import KPipeline; import soundfile as sf; p=KPipeline(lang_code='a'); [sf.write(f'out{i}.wav', a, 24000) for i,(g,ps,a) in enumerate(p('Self-hosting a speech model is cheaper than you think.', voice='af_heart'))]" - 04
Wrap it in HTTP and point your existing code at it
Kokoro-FastAPI exposes it as OpenAI's /v1/audio/speech, so an existing SDK just needs a new base_url. It also adds /v1/audio/voices/combine for weighted voice blending with syntax like af_bella(2)+af_sky(1). The default image is CUDA 12.6; if you booted an RTX 5090, switch to the latest-cu128 tag. Text normalization occasionally swallows phrases — send normalization_options.normalize=false when it does.
docker run --gpus all -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-gpu:latest
What an audiobook actually costs
Take the measured 35–100x realtime factor from Kokoro-FastAPI on a 4060Ti and be conservative at 30x: a 10-hour audiobook needs 10 ÷ 30 = 0.34 GPU-hours of synthesis. On an RTX 3090 24GB at $0.193/GPU-hour that is 0.34 × 0.193 ≈ $0.066. Add five minutes for pulling the image and downloading the 327MB weights (0.08 GPU-hours ≈ $0.016) and the whole job comes to under $0.09. For an always-on service: a 3090 running flat out for a month is 24 × 30 × 0.193 = $138.96, and since billing is metered per second, shutting down overnight zeroes the compute line immediately — only storage keeps ticking at $0.414/GB-month, and Kokoro's weights plus every voice file come to under 400MB, roughly $0.17 a month. Even reproducing the training is priceable: v1.1-zh's 120 A100 hours on an A100 PCIE 80GB at $0.824/GPU-hour is 120 × 0.824 = $98.88, and v1.0's ~500 hours is 500 × 0.824 = $412. No setup fee, no minimum, no quota request.
04 —
FAQ
How much VRAM does Kokoro TTS actually need to self-host?
Can Kokoro clone a voice from a short recording the way GPT-SoVITS does?
Does Kokoro support German or Russian, and how good is its Mandarin?
Why does my long text get truncated or mispronounced?
Is there any point renting an H100 for Kokoro?
How long from booting a NexGPU instance to hearing the first clip?
More in Speech synthesis
Start building on NexGPU
Enterprise R&D team or solo developer — either way, your first job can be running in minutes.
Sign up to browse live network pricing. No payment method required.
