Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
kokoro-tiny 🎤
Minimal, blazing-fast TTS (Text-to-Speech) crate powered by the Kokoro model (82M params). Perfect for embedding in applications, system alerts, and smart tools!
🚀 0.5-2s time-to-first-audio | 📦 Single-file implementation | 🎯 Zero-config usage
Features
- ⚡ Extremely fast inference using ONNX Runtime
- 🎨 50+ built-in voices with style mixing support
- 🔊 Direct audio playback with volume control
- 📁 Multiple formats: WAV, MP3, OPUS, FLAC
- 💾 Smart caching - downloads model once to
~/.cache/kokoros
- 🛠️ CLI included -
kokoro-speak
for instant TTS
Quick Start
Add to your Cargo.toml
:
[]
= "0.1"
Usage
As a Library
use TtsEngine;
async
Voice Mixing
Create unique voices by blending:
// Mix voices with weights
let audio = tts.synthesize?;
CLI Tool
Install the CLI:
Use it instantly:
# Speak text
# System alerts
# Pipe input
|
# Context summaries (perfect for smart-tree!)
# Save to file
# List voices
Available Voices
50+ voices across accents and styles:
- American: af_sky, af_bella, am_adam, am_michael
- British: bf_emma, bm_george
- Special: af_heart (warm), am_echo (clear)
Use --list-voices
to see all options!
Features
Enable additional capabilities:
[]
= { = "0.1", = ["all-formats"] }
playback
- Direct audio playback (default)mp3
- MP3 encoding supportopus-format
- OPUS for streaming/VoIPcuda
- GPU accelerationall-formats
- All audio formats
Examples
Check out the examples directory:
# Simple usage
# Test all voices
# Audio format comparison
Performance
- Time-to-first-audio: 0.5-2 seconds
- Model size: 82M parameters
- Audio quality: 24kHz sample rate
- Memory usage: ~200MB with model loaded
Use Cases
Perfect for:
- 🔔 System notifications - Build alerts, test results
- 📊 Smart tools - Audio context summaries
- 🎮 Game development - Dynamic NPC voices
- 📱 Accessibility - Screen reader functionality
- 🤖 Automation - Voice announcements for scripts
Model Details
kokoro-tiny uses the Kokoro-82M model:
- Lightweight transformer architecture
- Trained on extensive speech datasets
- Optimized for CPU inference
Contributing
Contributions welcome! This project is maintained by Hue & Aye at 8b.is.
For the full Kokoro implementation with advanced features, check out Kokoros.
License
Apache 2.0 - See LICENSE
Built with 🎉 by the 8b.is team | Powered by the amazing Kokoro model