CoolFace
Modelpublic

idle-intelligence/kitten-tts-nano-safetensors

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
1likes29downloads
Model Card

KittenTTS Nano — Safetensors

KittenTTS nano model weights converted to safetensors format for candle (Rust) inference.

Original model: KittenML/kitten-tts-nano-0.8 (ONNX)

Model Details

ArchitectureStyleTTS 2 (distilled) — single forward pass, non-autoregressive
Parameters14M
Sample rate24 kHz
Voices8 built-in (bella, bruno, hugo, jasper, kiki, leo, luna, rosie)
InputIPA phonemes (from espeak-ng)
LicenseApache 2.0

Files

FileSizeDescription
kitten-nano.safetensors53 MBModel weights (F32)
kitten-voices.safetensors3.1 MB8 voice style embeddings (400 × 256, F32 each)
config.json—Model configuration

Usage

Rust CLI (candle)

bash
# Download
hf download idle-intelligence/kitten-tts-nano-safetensors --local-dir models/kitten-nano

# Build and run (zero system dependencies)
cargo build --example kitten_generate -p kitten-core --release --features espeak
./target/release/examples/kitten_generate \
  --model models/kitten-nano/kitten-nano.safetensors \
  --voices models/kitten-nano/kitten-voices.safetensors \
  --voice jasper \
  --text "Hello, this is a test of the text-to-speech system." \
  --output hello.wav

Browser (WASM)

This model runs in the browser via WebAssembly. See tts-web for the full demo.

Conversion

Weights were extracted from the ONNX model using scripts/convert_kitten_to_safetensors.py:

  • —ONNX initializers → safetensors tensors
  • —Weight names remapped to match the candle module hierarchy
  • —MatMul weights transposed to candle Linear convention [out, in]
  • —LSTM weights kept in ONNX packed format [directions, 4*hidden, input]
  • —Voice embeddings extracted from voices.npz and mapped to friendly names

Source ONNX SHA-256 is embedded in safetensors metadata for traceability.

Architecture

Text → espeak IPA → phoneme IDs → BERT (ALBERT, 12 layers)
  → Text Encoder (LSTM chain + CNN)
  → Predictor (duration, F0, noise amplitude)
  → Decoder (encode/decode blocks + HiFi-GAN + iSTFT)
  → 24 kHz audio

Performance

PlatformRTFNotes
Native (M-series Mac)0.3x~3x faster than realtime
WASM (Chrome, desktop)~0.9xNear realtime

Citation

bibtex
@misc{kittentts,
  title={KittenTTS: Ultra-lightweight Text-to-Speech},
  author={KittenML},
  url={https://github.com/KittenML/KittenTTS},
  year={2025}
}

Acknowledgments