On-device text-to-speech for Flutter.
Generate speech on Android, iOS, macOS, Linux, and Windows without sending text to a cloud TTS API.
Developer preview. APIs may change between releases.
Playback is intentionally app-provided. Pass an
AudioPlayerimplementation toKittenTTS.create()when you wantspeak()orplay().
iOS · Basic example Android · Basic example Web · Browser example
KittenTTS Flutter lets you add local speech synthesis to a Flutter app:
- Text-to-speech - neural voice synthesis from plain text.
- On-device inference - powered by KittenTTS and ONNX Runtime.
- Private by default - no cloud TTS request after assets are available.
- Offline-ready - download once into the app cache, or point the SDK at local model files.
- App-friendly output - play audio directly, save WAV data, or use generated word timings for read-aloud UI.
No cloud. No API key. No text leaving the device for speech generation.
The SDK sends anonymous generation analytics; see Getting started for details and opt-out.
| Runtime | Status | Docs |
|---|---|---|
| Flutter Android | Developer preview | Getting started |
| Flutter iOS | Developer preview | Getting started |
| Flutter macOS | Developer preview | Getting started |
| Flutter Linux | Developer preview | Getting started |
| Flutter Windows | Developer preview | Getting started |
Install:
flutter pub add kittentts_flutterInstall the SDK:
flutter pub add kittentts_flutterGenerate audio in memory:
import 'package:kittentts_flutter/kittentts_flutter.dart';
final tts = await KittenTTS.create(
onProgress: (progress, info) {
print('setup ${(progress * 100).round()}%');
},
);
final result = await tts.generate('Hello from KittenTTS on Flutter.');
print(result.duration);
print(result.wavBase64());
await tts.dispose();Play audio through your app's audio layer:
final tts = await KittenTTS.create(player: myAudioPlayer);
await tts.speak('This voice is generated on the device.');Implement AudioPlayer with the package your app already uses, such as
audioplayers, just_audio, or a native audio bridge.
examples/basic- basic model, voice, speed, Generate, Speak, and Queue demo controls.examples/word_timings- word highlighting with generated timings.
- On-device TTS inference on Android, iOS, macOS, Linux, and Windows.
- Model download and cache with progress callbacks.
- Local/offline model files for apps that cannot depend on a first-run download.
- CE phonemizer through Dart FFI on native platforms.
- Playback interface for app-provided audio players.
- FIFO playback queue for serializing generated clips.
- WAV output as raw PCM samples, bytes, or base64.
- MP3 helpers are not bundled until a small non-GPL Flutter encoder is available.
- Word timings for read-aloud highlighting.
- Streaming generation for longer text.
Start with nano-int8 for the smallest download. Use larger models when quality
matters more than size.
| Model | ID | Parameters | Approx download | Use case |
|---|---|---|---|---|
| Nano int8 | "nano-int8" |
15M | 25 MB | Smallest app/download size |
| Nano fp32 | "nano" |
15M | 56 MB | Nano quality without quantization |
| Micro | "micro" |
40M | 41 MB | Better quality, still compact |
| Mini | "mini" |
80M | 80 MB | Highest quality option |
Bella, Jasper, Luna, Bruno, Rosie, Hugo, Kiki, Leo
await tts.speak('Luna speaking.', voice: 'luna');
await tts.speak('Slower Bruno speaking.', voice: 'bruno', speed: 0.85);- Docs overview
- Getting started
- Playback
- Local/offline assets
- Word timings
- Models and voices
- API reference
- Troubleshooting
Tutorials:
- Tutorials are not written yet for the Flutter SDK.
-
Flutter
>= 3.22 -
Dart
>= 3.4 -
iOS
16+ -
macOS
14+ -
Android API
21+ -
Linux and Windows native build toolchains for desktop targets Runtime dependencies installed by the SDK:
-
flutter_onnxruntime -
path_provider -
http -
archive -
ffi
Audio playback is optional. Use an app-side audio package such as
audioplayers, just_audio, or your own native audio layer.
- Add first-party playback adapters for common Flutter audio packages.
- Add more streaming playback examples.
- Add more reader-app helpers around pause, resume, and seek state.
- Support future KittenTTS model releases as they become available.
Need something specific? Open an issue.
- Website: kittenml.com
- Repository: KittenML/KittenTTS-flutter
- Discord: Join the community
- Demo: Hugging Face Spaces
- Issues: GitHub Issues
Commercial support is available for teams integrating KittenTTS into their products, including integration assistance, custom voice development, and enterprise licensing.
Contact us or email info@stellonlabs.com to discuss your requirements.
Apache 2.0. See LICENSE.
KittenTTS Flutter is a developer preview and APIs may change between releases. Generated speech quality, pronunciation, timing metadata, and playback behavior can vary by model, platform, device, and audio backend. Review generated audio before using it in production workflows.
The SDK runs speech generation locally after assets are available. Anonymous
generation analytics are enabled by default and can be disabled with
analytics: false.



