Releases: ikeoffiah/kitten_tts_flutter
Releases · ikeoffiah/kitten_tts_flutter
v0.0.4 – Removed forced transitive dependency.
v0.0.2 – Initial release: KittenTTS v0.8 offline TTS Upgraded the packages.
0.0.2
- Dependency updates.
v0.0.1 – Initial release: KittenTTS v0.8 offline TTS for Flutter (iOS, Android, macOS)
Summary
First release of kitten_tts_flutter: high-quality offline text-to-speech for Flutter using the KittenML KittenTTS v0.8 ONNX model and espeak-ng for phonemization. Supports iOS, Android, and macOS.
Features
- Offline TTS – Model, voice embeddings (
voices.npz), and espeak-ng data are downloaded and cached on first run (~35 MB). No server required after that. - Eight voices – Bella, Jasper, Luna, Bruno, Rosie, Hugo, Kiki, Leo.
- Configurable speed – User-controllable playback speed with per-voice priors.
- Robust chunking – Sentence-aware splitting (default 200 chars), automatic split when token count exceeds 500 to avoid ONNX errors.
- Trailing punctuation – Ensures phrase boundaries for correct prosody.
- Public API –
KittenTTSwithinitialize(),generate(),generateChunk(),splitText(), pluskittenVoicesandModelManager.
Platform support
| Platform | Build | Notes |
|---|---|---|
| iOS | CocoaPods | espeak-ng sources in plugin; Swift bridge keeps C symbols for Dart FFI. Min iOS 16.0. |
| macOS | CocoaPods | Same approach as iOS. |
| Android | CMake | Builds from third_party/espeak-ng. Run scripts/setup_espeak.sh in the plugin repo first. Includes config.h, PATH_ESPEAK_DATA, and sPlayer exclusion for phonemizer-only build. |
Technical details
- Phonemization: espeak-ng (Dart FFI on iOS/macOS; native lib on Android).
- Tokenization: StyleTTS 2–compatible text cleaner (IPA symbol → index).
- Inference: flutter_onnxruntime; inputs
input_ids(Int64),style,speed; output waveform at 24 kHz. - Voice embeddings: Loaded from
voices.npz(NumPy ZIP); style vector chosen by text length.
Fixes and compatibility
- ONNX input: Uses
Int64Listforinput_ids(no BigInt) for compatibility with flutter_onnxruntime. - Token limit: Chunks over 500 tokens are split further to prevent BERT Expand node errors.
- Android: Supports both legacy (
speak_lib.c) and current (speech.c) espeak-ng layouts; glob for sources;config.handPATH_ESPEAK_DATAfor a clean compile;sPlayer.cexcluded whenUSE_SPEECHPLAYER=0.
Documentation and license
- License: MIT (Copyright (c) 2026 Pius Ikeoffiah).
- Changelog: See CHANGELOG.md.
- Setup: See README.md; Android requires
scripts/setup_espeak.shandthird_party/espeak-ng.
Installation
dependencies:
flutter_kitten_tts: ^0.0.1dependencies:
kitten_tts_flutter:
git:
url: https://github.com/ikeoffiah/kitten_tts_flutter.git
ref: main