AI ShortsOpen the app
Try today ยท

Tiny 13 MB text-to-speech model needs no graphics card

A hobby project squeezed a popular text-to-speech model into a 13 MB file, small enough for almost any device. It turns written text into spoken audio with no graphics card. The author says it runs about 31 times faster than the original on one ordinary processor core.

Text-to-speech models turn written words into spoken audio. Kokoro-82M is a popular small one, and a developer has posted a distilled version, meaning a smaller model trained to copy a bigger one.

The new model has 3.27 million learned parameters, compared with 81.8 million for Kokoro. Its weights take 13 MB on disk, against 327 MB. It keeps Kokoro's 28 English voices.

On one CPU thread of an Apple-silicon laptop, the author reports speeds about 28 times faster with PyTorch and about 31 times faster with ONNX Runtime. Peak memory is under 1 GB, and the first block of audio for a short sentence takes about 12 milliseconds.

These are the author's own measurements, and speed wasn't tested on a phone. The license is Apache-2.0, the same as Kokoro-82M. The page gives no release date for the current version.

New to this? The key idea

Distillation trains a small model to imitate a big one, like an apprentice copying a master until the results look alike. Text-to-speech turns words into audio. A tiny model can run on a normal processor, so it needs no graphics card or cloud service, and your text never leaves the device.

Use it at work

Use it for: developers who want offline voice output in an app or device, such as read-aloud features, kiosks or small gadgets.

Try it: steps from the model page:

pip install torch safetensors huggingface_hub numpy soundfile
hf download drmhse/nano-edge-tts-standalone --local-dir nano-tts \
  --include "nano_*.py" --include config.json --include nano-tts.safetensors --include "frontend/*"
cd nano-tts
python nano_tts.py "Hello from a very small model." --voice af_heart --out hello.wav

In Python, `from nano_tts import load` gives a `load()` function. Call `tts = load()`, then `tts('text', voice='bm_george')` to get 24 kHz audio. Use `load(device='cuda')` or `'mps'` for a GPU. An ONNX path exists too: `python onnx_tts.py "..." --voice af_heart --out hello.wav`.

Before you roll it out: the licence is Apache-2.0, like Kokoro-82M, and the packaged front end includes pronunciations computed with espeak-ng (GPL-3.0), though no espeak-ng code. Cost is free, and it runs locally on CPU, so no data leaves your machine. It is English only, with 28 voices, and at best sounds like Kokoro-82M. The post-filter adds some flutter at 4 to 8 kHz, and rare names are guessed less reliably. Listening results come from one listener, and speed was measured on a laptop CPU, not a phone. The current version is 2.3.

Summaries are written by AI from the linked source. Always check the original.

Get AI Shorts by email

Every morning, the day's stories in one short email. Unsubscribe in one tap.