idle-intelligence/kitten-tts-nano-safetensors
129
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
Files
Usage
Rust CLI (candle)
# 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.wavBrowser (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.npzand 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 audioPerformance
Citation
@misc{kittentts,
title={KittenTTS: Ultra-lightweight Text-to-Speech},
author={KittenML},
url={https://github.com/KittenML/KittenTTS},
year={2025}
}Acknowledgments
- KittenML for the original KittenTTS model
- yl4579 for StyleTTS 2
- Hugging Face candle for the Rust ML framework
