Instructions to use pylotlight/Libra-TTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use pylotlight/Libra-TTS with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download pylotlight/Libra-TTS --local-dir Libra-TTS
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Multilingual text-to-speech model with 16 languages and 8 voices in 0.3B parameters, running faster than real time
Libra TTS reads text in English, Chinese, Japanese, Korean, German, French, Spanish, Italian, Portuguese, Russian, Arabic, Hindi, Punjabi, Bengali, Urdu and Indonesian.
Samples
Default settings, seed 0, text exactly as written.
| English ยท Nina | |
| English ยท Bob | |
| English, raw numbers and times ยท Sofia | |
| Chinese ยท Aliya | |
| Japanese ยท Maya | |
| Korean ยท Sam | |
| Spanish ยท Jon | |
| French ยท Nina | |
| German ยท Omar | |
| Hindi ยท Omar | |
| Punjabi ยท Bob | |
| Arabic ยท Aliya | |
| Portuguese ยท Sofia |
Highlights
- Lowest English error rate of the open models we tested: 1.64% WER, ahead of Magpie-357M, Kokoro-82M and both Qwen3-TTS models (2.74% at 1.7B, 3.21% at 0.6B).
- Beats Qwen3-TTS 1.7B and 0.6B across their ten languages (1.77% average error vs 2.75% and 2.62%) at a sixth and a third of their size, and comes in below the 1.9B model it was distilled from (1.91%).
- 16 languages, six more than Qwen3-TTS: adds Arabic, Hindi, Punjabi, Bengali, Urdu and Indonesian.
- Fast: one sentence at a time 7.7x faster than real time on a MacBook Pro and 8.7x on an RTX 3090; 44x reading long text on a MacBook Pro and 72x on an RTX 3090; 2.4x on a CPU with ONNX.
- Runs everywhere: Apple silicon (MLX), NVIDIA GPUs on Windows and Linux (PyTorch with CUDA graphs) and any CPU (ONNX Runtime); the live demo reads on a GPU.
- Reads raw text: numbers, dates, times and currencies need no preprocessing.
- Speaking styles: 12 styles from warm to whispering, read slower or faster.
Run it
On a Mac with Apple silicon, on the GPU with MLX:
pip install "libra-tts[ja] @ https://github.com/ekambrar100/Libra-TTS/archive/refs/heads/main.zip"
libra-tts "Some days, the smallest moments are the ones we remember." -o hello.wav
On an NVIDIA GPU, Windows or Linux (GeForce RTX 20-series or newer), with PyTorch and CUDA graphs. On Windows,
install PyTorch with GPU support first (a plain pip install torch there has none):
pip install torch --index-url https://download.pytorch.org/whl/cu126
pip install "libra-tts[cuda,ja] @ https://github.com/ekambrar100/Libra-TTS/archive/refs/heads/main.zip"
An RTX 3090 reads one sentence at a time 8.7x faster than real time and long text 72x. On Linux, LibraTTS() also
compiles its layers when it loads (a few seconds, cached), about 15% faster one sentence at a time.
On any CPU, with ONNX Runtime:
pip install "libra-tts[onnx,ja] @ https://github.com/ekambrar100/Libra-TTS/archive/refs/heads/main.zip"
In Python, LibraTTS() picks the first of MLX, CUDA and ONNX Runtime that is installed:
from libra_tts import LibraTTS
tts = LibraTTS()
tts.save("hello.wav", tts.synthesize("Hello from Libra.", voice="nina"))
tts.synthesize("It can keep a secret.", voice="nina", style="whispering")
tts.synthesize("Okay, you win.", voice="jon", style="wry")
Voices: nina (default), sofia, aliya, maya, omar, jon, bob, sam.
Languages: en zh ja ko de fr es it pt ru ar hi pa bn ur id, detected sentence by sentence from the script by default, so one text can mix languages (pass lang for
Latin-script languages other than English).
Styles: warm cheerful excited sad frightened calm serious wry tender whispering dramatic documentary
(pace="slow" / "fast").
Benchmarks
Error rate of a speech recognizer on the generated audio (Whisper-large-v3; Paraformer-zh for Chinese; Omnilingual ASR for Punjabi, Bengali, Urdu), seed-tts-eval scoring, lower is better. Every model ran with its own default settings and text processing on the same sentences, one read each. Parameters are each model's own weights as released, without a separate audio decoder (Libra and Qwen3-TTS use the same Qwen3-TTS codec decoder; Kokoro and KittenTTS have theirs built in). Qwen3-TTS's names count only the language model it grew from; its released weights are 1.9B (1.7B) and 0.9B (0.6B).
| model | parameters | English WER | 10-language average |
|---|---|---|---|
| Libra TTS | 0.3B | 1.64% | 1.77% |
| Qwen3-TTS 1.7B | 1.9B | 2.74% | 2.75% |
| Qwen3-TTS 0.6B | 0.9B | 3.21% | 2.62% |
| Magpie-357M | 357M | 1.77% | โ |
| Kokoro-82M | 82M | 1.80% | โ |
| MOSS-TTS-Nano | 100M | 3.06% | 8.83% |
| Soprano-1.1 | 80M | 3.45% | โ |
| PocketTTS | 100M | 3.81% | โ |
| KittenTTS mini 0.8 | 74M | 4.33% | โ |
English: Seed-TTS-eval test-en + LibriSpeech-PC test-clean, 2,215 sentences.
Ten languages: the MiniMax multilingual test set, 100 sentences per language ("โ": the model does not cover all ten).
Libra vs Qwen3-TTS on the average: โ0.98 points vs 1.7B and โ0.85 vs 0.6B (95% CIs exclude zero).
| error % | parameters | en | zh | ja | ko | de | fr | es | it | pt | ru |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Libra TTS | 0.3B | 1.07 | 0.98 | 3.84 | 2.08 | 0.50 | 2.74 | 0.60 | 1.00 | 1.07 | 3.85 |
| Qwen3-TTS 1.7B | 1.9B | 0.94 | 0.75 | 3.47 | 4.87 | 2.39 | 4.71 | 1.47 | 2.05 | 2.18 | 4.69 |
| Qwen3-TTS 0.6B | 0.9B | 1.25 | 1.15 | 6.02 | 1.92 | 0.90 | 4.11 | 1.55 | 1.74 | 2.33 | 5.26 |
WER Beyond Qwen3-TTS's languages:
Arabic and Indonesian have WERs of 2.34% and 0.86%, respectively. Punjabi, Bengali and Urdu are low resource languages to the extent that the model WER is difficult to establish and separate from a recognizer's error.
Speed
| MacBook Pro, M5 Max | Libra TTS | Qwen3-TTS 0.6B size | Qwen3-TTS 1.7B |
|---|---|---|---|
| GPU (MLX), one sentence at a time | 7.7x real time | 5.1x | 3.6x |
| peak memory | 2.0 GB | 3.8 GB | 5.8 GB |
20 English sentences of 5-25 s, end to end (text in, 24 kHz audio out); all three on the same MLX engine. Long text is read up to 64 utterances at a time: 15 minutes of audio in 20 seconds (44x real time, 4 GB peak).
ONNX Runtime on Mac CPU: 2.4x real time.
| NVIDIA RTX 3090 (PyTorch, CUDA) | Libra TTS |
|---|---|
| one sentence at a time (the same 20 sentences) | 8.7x real time, 2.4 GB of GPU memory |
| long text, 64 utterances at a time | 72x real time, 3.6 GB |
Files
| file | |
|---|---|
model.safetensors |
talker + residual-code predictor, bfloat16 (307M parameters) |
codec.safetensors |
Qwen3-TTS 12 Hz codec decoder (114M; float32 head, float16 body) |
onnx/ |
the same model as three ONNX graphs (talker, predictor, decoder), float32 |
tokenizer.json, config.json |
text tokenizer, model configuration |
frontend/ |
English lexicon and abbreviation list, Chinese rare-token list |
How it was made
Libra TTS is distilled from a fine-tuned Qwen3-TTS-12Hz-1.7B teacher. It has a 14-layer low-rank talker and a 5-layer residual-code predictor (307M parameters) built from the teacher's own weights through SVD (and then trained on over 9,000 hours of the teacher's speech) and the Qwen3-TTS 12 Hz codec decoder (114M). A final round of online reinforcement learning (GRPO) on the model's own readings in all 16 languages and lowered its error rate (ten-language average 1.93% to 1.77%).
License
Apache 2.0, have fun.
Hybrid engine + quantized build (this duplicate)
This repo duplicates the upstream model and adds a weights-only fp16 build and an in-process, Python-free ORT-web engine. The engine lives in the GitHub fork PylotLight/Libra-TTS โ see its HYBRID.md. Nothing here changes the upstream model itself.
Added files
| path | meaning |
|---|---|
quant/fp16/*.onnx |
shipping fp16 graphs โ 872 MB total (556 / 88 / 229 MB) |
eval/ |
historical matrix and chart report (INT8 rows are from a removed build) |
eval/matrix-mac-hybrid.json |
all 27 per-graph precision combinations |
eval/report.html |
standalone SVG charts: size, generation, first audio, decode, RTF, loss |
Evaluation (Apple Silicon / Chrome, hybrid backend, 12 frames)
| talker / predictor / decoder | MB | codes | wave max abs diff | gen ms | decode ms | RTF | verdict |
|---|---|---|---|---|---|---|---|
| fp32 / fp32 / fp32 | 1742 | 192/192 | 4.47e-8 | 880 | 72 | 0.97 | reference |
| fp32 / fp32 / fp16 | 1514 | 192/192 | 6.59e-6 | 881 | 61 | 0.99 | usable |
| fp32 / fp16 / fp16 | 1427 | 192/192 | 6.59e-6 | 888 | 57 | 0.99 | usable |
| fp16 / fp32 / fp32 | 1187 | 192/192 | 4.47e-8 | 892 | 60 | 0.98 | usable |
| fp16 / fp32 / fp16 | 959 | 192/192 | 6.59e-6 | 901 | 74 | 0.95 | usable |
| fp16 / fp16 / fp32 | 1100 | 192/192 | 4.47e-8 | 902 | 68 | 0.96 | bit-identical wave |
| fp16 / fp16 / fp16 | 872 | 192/192 | 6.59e-6 | 900 | 70 | 0.95 | shipping default |
Only the fp32/fp16 combinations are usable. INT8 was investigated and removed: per-channel and dequantize-to-fp32 variants still changed the sampled codes (1/192 and 39/192), and decoder-only INT8 measured 21.6 dB waveform SNR versus 58.2 dB for fp16 (audible degradation). Details are in the fork's poc/quant/INT8-INVESTIGATION.md. Quantization buys download size, not loop speed (generation stays ~0.9 s for 12 frames). Historical data: eval/matrix-mac-hybrid.json, chart report.
Use
git clone https://github.com/PylotLight/Libra-TTS && cd Libra-TTS
hf download pylotlight/Libra-TTS --include "config.json" "tokenizer.json" "frontend/*"
hf download pylotlight/Libra-TTS --include "quant/fp16/*" --local-dir ./hf-model
cd web && bun install && LIBRA_QUANT_DIR=../hf-model/quant bun run dev
# /synth.html โ fp16 + hybrid by default; /engine.html for parity; /bench.html for the eval
?weights=fp32 selects the upstream fp32 graphs as the correctness reference. No finetune is published yet โ finetune/<name>/ is reserved for one, with its own eval row in this card. The conversion and this duplicate remain Apache 2.0 with the upstream attribution above.
- Downloads last month
- -
Quantized
Model tree for pylotlight/Libra-TTS
Base model
Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice