Skip to content

KittenML/KittenTTS-react-native

KittenTTS React Native

Kitten TTS React Native

On-device text-to-speech for React Native.
Generate speech on iOS and Android without sending text to a cloud TTS API.

Hugging Face Demo Discord Website GitHub License React Native iOS Android

Developer preview. APIs may change between releases.

Expo Go will not work. KittenTTS uses native modules (onnxruntime-react-native and react-native-fs), so Expo apps need a development build or a prebuilt native project.

See It In Action

KittenTTS Expo example running on iOS KittenTTS word highlighting demo on Android

Device: iOS · Expo example     Device: Android · Word timings


What Is KittenTTS React Native?

KittenTTS React Native lets you add local speech synthesis to a mobile 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 device cache, or bundle assets into the native app.
  • 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.


SDK

Runtime Status Docs
React Native iOS Developer preview Getting started
React Native Android Developer preview Getting started
Expo development build Supported Expo setup
Expo Go Not supported Why not?

Install:

npm install @kittentts/react-native

Quick Start

Install the SDK:

npm install @kittentts/react-native

Generate a WAV in memory:

import { KittenTTS } from '@kittentts/react-native';

const tts = await KittenTTS.create(undefined, (progress) => {
  console.log(`setup ${Math.round(progress * 100)}%`);
});

const result = await tts.generate('Hello from KittenTTS on React Native.');

console.log(result.duration);
console.log(result.wavBase64());

await tts.dispose();

Play audio through Expo Audio:

import * as ExpoAudio from 'expo-audio';
import { KittenTTS, createExpoAudioPlayer } from '@kittentts/react-native';

const tts = await KittenTTS.create({
  player: createExpoAudioPlayer(ExpoAudio),
});

await tts.speak('This voice is generated on the device.');

Full getting started guide →


Expo Setup

Expo Go cannot load the native ONNX Runtime and filesystem modules used by this SDK. Use a development build:

npm install @kittentts/react-native
npx expo install expo-audio expo-dev-client
npx expo prebuild
npx expo run:ios

For Android:

npx expo run:android

After the development build is installed:

npx expo start --dev-client

If the app opens in Expo Go, stop it and run npx expo run:ios or npx expo run:android again.


Sample Apps


Features


Supported Models

Start with NanoInt8 for the smallest download. Use larger models when quality matters more than size.

Model Enum Parameters Approx download Use case
Nano int8 KittenModel.NanoInt8 15M 28 MB Smallest app/download size
Nano fp32 KittenModel.Nano 15M 59 MB Nano quality without quantization
Micro KittenModel.Micro 40M 44 MB Better quality, still compact
Mini KittenModel.Mini 80M 83 MB Highest quality option

Models and voices →

Voices

Bella, Jasper, Luna, Bruno, Rosie, Hugo, Kiki, Leo
await tts.speak('Luna speaking.', KittenVoice.Luna);
await tts.speak('Slower Bruno speaking.', KittenVoice.Bruno, 0.85);

Docs

Tutorials:


System Requirements

  • React Native >= 0.72
  • iOS 15.1+
  • Android API 24+
  • Node.js 20+ recommended for examples

Runtime dependencies installed by the SDK:

  • onnxruntime-react-native
  • react-native-fs
  • pako

Audio playback is optional. Use expo-audio, react-native-sound, or a custom player.


Roadmap

  • Improve streaming and playback queue primitives.
  • Add more reader-app helpers around pause, resume, and seek state.
  • Continue tracking ONNX Runtime compatibility across React Native and Expo releases.
  • Support future KittenTTS model releases as they become available.

Need something specific? Open an issue.


Community And Support

License

Apache 2.0. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors