The KeenASR React Native plugin provides on-device automatic speech recognition (ASR) for iOS and Android from a single TypeScript API. All speech processing runs locally on the device, so no internet connection or cloud service is required.

The plugin is a Turbo Module that wraps the native KeenASR SDK on each platform, exposing a unified TypeScript API. Your code stays the same regardless of whether the app runs on iOS or Android.

Supported Platforms

  iOS Android
Minimum OS iOS 13 Android 8.1 (API 27)
Native SDK KeenASR for iOS 2.2 KeenASR for Android 2.2

React Native Requirements

  • React Native 0.79 or later
  • React 19 (matches the React peer dependency of supported React Native versions)
  • New Architecture (TurboModules) is required; Old Architecture (Paper) is not supported.
  • Expo: bare React Native workflows only; managed Expo will be provided in future releases.

Tooling Requirements

  • Node.js 18+ and yarn 4
  • Xcode 14+ with Command Line Tools (for iOS)
  • Android Studio with SDK 27+ and JDK 17+ (for Android)

How It Works

The plugin exposes a TypeScript API backed by a Turbo Module spec. On each platform, the spec is implemented by a native module that calls directly into the corresponding KeenASR SDK:

┌──────────────────────────────┐
│  TypeScript API              │   Public interface, event helpers
│  + TurboModule spec          │
└──────────┬───────────────────┘
           │ NativeModules / TurboModuleRegistry
           ├─────────────────────────┐
           ▼                         ▼
┌──────────────────┐     ┌──────────────────────┐
│  iOS Module      │     │  Android Module      │
│  (Objective-C)   │     │  (Java)              │
└────────┬─────────┘     └──────────┬───────────┘
         │                          │
         ▼                          ▼
┌──────────────────┐     ┌──────────────────────┐
│  KeenASR.xcfwk   │     │  KeenASR.aar         │
│  (iOS SDK)       │     │  (Android SDK)       │
└──────────────────┘     └──────────────────────┘

The typical flow is:

  1. Initialize the SDK with an ASR bundle (acoustic model).
  2. Create a decoding graph from a list of phrases.
  3. Prepare the recognizer with the decoding graph.
  4. Start listening; the recognizer captures audio and decodes in real time.
  5. Receive partial results as the user speaks.
  6. Receive the final response when VAD detects end of speech. Call response.release() when done.

Before You Start

We recommend reviewing the pages under the Overview and Concepts sections of the main KeenASR documentation, in particular the Introduction, Getting Started, the Glossary, and Recognition Results and Callbacks. These pages explain core concepts (ASR bundles, decoding graphs, VAD, pronunciation scoring) that apply across all platforms.