Skip to main content

React Native SDK

@kittentts/react-native runs KittenTTS locally through ONNX Runtime. Native apps use ONNX Runtime React Native and filesystem storage; React Native Web uses ONNX Runtime Web and browser storage.

Package 1.2.0React Native 0.72 or later
Mobile and webiOS 15.1+, Android API 24+, modern browsers
Local inference24 kHz WAV, streaming, playback, and timings
import {KittenTTS, KittenModel, KittenVoice} from '@kittentts/react-native';

const tts = await KittenTTS.create({model: KittenModel.NanoInt8});
const result = await tts.generate('Generated on the device.', KittenVoice.Bella);
console.log(result.duration, result.wavBase64());
await tts.dispose();

Capabilities

  • Four models and eight voices.
  • In-memory generation and sentence-by-sentence streaming.
  • Expo Audio, React Native Sound, browser, or custom playback adapters.
  • Model download progress, predownload, cache inspection, redownload, and clear operations.
  • Fully bundled model and phonemizer assets for offline-first apps.
  • Model-predicted word timings for read-aloud UI.
Expo Go is not supported

Native inference requires modules that Expo Go does not contain. Use an Expo development build, prebuild, or a bare React Native project.

Repository: KittenML/KittenTTS-react-native