nano-edge-tts

nano-edge-tts is a replacement decoder created by community authors for Kokoro-82M: pronunciation, rhythm, pitch, and 28 voice timbres all follow Kokoro, but the 5330-parameter waveform decoder is replaced with a 175-parameter "pulse train + white noise" harmonic-plus-noise synthesizer, eliminating neural network execution at the audio sample rate. The authors measured approximately 33x speedup for the decoder and 11x for the entire pipeline on a single-threaded CPU of an Apple M4, with peak memory dropping from 1.4–1.7 GB to 0.75 GB, and a Whisper word error rate of 4.69% (compared to 4.63% for Kokoro). load() directly returns the Kokoro model with the swapped decoder, allowing it to be used anywhere Kokoro is currently used.

nano-edge-tts is a replacement decoder created by community authors for Kokoro-82M: pronunciation, rhythm, pitch, and 28 voice timbres all follow Kokoro, but the 5330-parameter waveform decoder is replaced with a 175-parameter "pulse train + white noise" harmonic-plus-noise synthesizer, eliminating neural network execution at the audio sample rate. The authors measured approximately 33x speedup for the decoder and 11x for the entire pipeline on a single-threaded CPU of an Apple M4, with peak memory dropping from 1.4–1.7 GB to 0.75 GB, and a Whisper word error rate of 4.69% (compared to 4.63% for Kokoro). load() directly returns the Kokoro model with the swapped decoder, allowing it to be used anywhere Kokoro is currently used.

Why it matters The text input and all voice timbres remain unchanged; only the most time-consuming waveform decoder is replaced. Existing Kokoro code requires almost no modification, making it suitable for embedding in edge devices.

Hugging Face likes 12 · Hugging Face upvotes 12 · Hugging Face downloads 82

License: Commercial use allowed · ComfyUI: Not available · VRAM: ≈1 GB (estimated)

Reasons

  • Apache-2.0, same as Kokoro-82M; includes the paper, raw data for 240 evaluation sentences, and 6 sets of comparative audio for the same sentences
  • The entire decoder consists of a single Python file, depending only on PyTorch

Usage

  • Run pip install kokoro==0.9.4 safetensors soundfile, then hf download drmhse/nano-edge-tts --local-dir nano-edge-tts. In that directory, use from nano_edge_tts import load, generate normally with KPipeline(lang_code='a', model=load()), and save at a 24000 sample rate

Risks

  • Trained and evaluated only on Kokoro's 28 American and British English voice timbres; other languages may run but have not been tested; performance is at best on par with Kokoro, and Chinese is not supported
  • Some voiced sounds have slight robotic artifacts; blind listening tests were conducted by the author alone, and speed was measured on a laptop CPU, not on mobile devices

Open

抱脸 text-to-speech 上升榜

Explore the latest AI Radar updates