Open Source
Explore the latest AI open-source projects from GitHub and HuggingFace.
Explore the latest AI open-source projects from GitHub and HuggingFace.
Kokoro-7M-Distill is an English text-to-speech model released by oddadmix under the Apache-2.0 license, distilled from hexgrad's Kokoro-82M down to 7,477,702 parameters (7.48M), an 11x cut that fits a 28.7 MB fp32 file small enough to run offline on a phone with no server involved, generating 24 kHz audio. It reuses the teacher's Kokoro/StyleTTS2 architecture, a 12-layer ALBERT encoder over phonemes, a prosody predictor for duration, pitch and energy, and an ISTFTNet decoder ending in a 20-point inverse STFT rather than more convolution; most of the size saving comes from the ALBERT layers sharing one parameter block and from predicting duration by summing 50 sigmoid gates per phoneme instead of regressing a number. Measured as median real-time factor over 24 sentences with both models on 4 CPU threads, no GPU, phoneme conversion excluded from timing for both, it posts an RTF of 0.0220 (0.081s synth) versus 0.0902 (0.327s) for Kokoro-82M, 4.1x faster than the teacher and ~45x faster than realtime. Training uses the teacher's own per-phoneme durations as a correct-by-construction alignment target, and optimizes multi-resolution STFT, duration L1, log-mel L1, a silence term (the decoder floors at a noise level the teacher lacks, audible as hiss), and WavLM feature matching (other losses ignore phase, sounding robotic without it), plus spectrogram discriminators; no quantified naturalness or MOS comparison against the teacher is published. It is single-voice, conditioned on the af_msa.pt style pack it was distilled against and that load_model.py defaults to; af_heart.pt ships only for backward compatibility, was never seen in training, and the README warns it degrades naturalness and intelligibility. Loading needs the repo's own load_model.py, not a bare from kokoro import KModel, since the decoder's non-default hidden_channels/out_channels make the stock package raise a TypeError; a patched kokoro package vendored in kokoro_patched/ keeps its own defaults, so the teacher still loads through it. Limitations: single voice, English only, best with ordinary prose since heavy punctuation and unusual formatting pass through as written.