Skip to content

KittenML/KittenTTS-flutter

Repository files navigation

KittenTTS Flutter

KittenTTS Flutter

On-device text-to-speech for Flutter.
Generate speech on Android, iOS, macOS, Linux, and Windows without sending text to a cloud TTS API.

Hugging Face Demo Discord Website GitHub License Flutter Android iOS Desktop

Developer preview. APIs may change between releases.

Playback is intentionally app-provided. Pass an AudioPlayer implementation to KittenTTS.create() when you want speak() or play().

See It In Action

KittenTTS Flutter basic example running on iOS KittenTTS Flutter basic example running on Android

KittenTTS Flutter web example running in a browser

iOS · Basic example     Android · Basic example     Web · Browser example

What Is KittenTTS Flutter?

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.

SDK

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_flutter

Quick Start

Install the SDK:

flutter pub add kittentts_flutter

Generate 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.

Full getting started guide →


Sample Apps


Features


Supported Models

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

Models and voices →

Voices

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

Tutorials:

  • Tutorials are not written yet for the Flutter SDK.

System Requirements

  • 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.


Roadmap

  • 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.


Community And Support

Commercial Support

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.

License

Apache 2.0. See LICENSE.

Disclaimers

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.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages