Skip to content

Releases: ikeoffiah/kitten_tts_flutter

v0.0.4 – Removed forced transitive dependency.

27 Feb 13:41

Choose a tag to compare

Removed dependency overrides from pubspec.yaml, to prevent unexpected bugs at runtime.

v0.0.2 – Initial release: KittenTTS v0.8 offline TTS Upgraded the packages.

26 Feb 11:34

Choose a tag to compare

v0.0.1 – Initial release: KittenTTS v0.8 offline TTS for Flutter (iOS, Android, macOS)

26 Feb 04:16

Choose a tag to compare

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 APIKittenTTS with initialize(), generate(), generateChunk(), splitText(), plus kittenVoices and ModelManager.

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 Int64List for input_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.h and PATH_ESPEAK_DATA for a clean compile; sPlayer.c excluded when USE_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.sh and third_party/espeak-ng.

Installation

dependencies:
  flutter_kitten_tts: ^0.0.1
dependencies:
  kitten_tts_flutter:
    git:
      url: https://github.com/ikeoffiah/kitten_tts_flutter.git
      ref: main