The KeenASR Unity Plugin provides on-device automatic speech recognition (ASR) for iOS and Android. All speech processing runs locally on the device, so no internet connection or cloud service is required.
The plugin wraps the native KeenASR SDK for each platform, exposing a unified C# API that handles platform differences automatically. 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) |
| Architecture | arm64 | arm64 (ARM64-v8a) |
| Simulator | arm64 (Apple Silicon, Unity 6+) | x86_64 (with IL2CPP) |
| Scripting backend | IL2CPP | IL2CPP |
Unity Version Requirements
- Unity 2023.2 or later
- Unity 6 (6000.x) recommended, and required for iOS Simulator builds on Apple Silicon
How It Works
The plugin uses a singleton pattern. On startup, KeenASR.Initialize() detects the platform and creates the appropriate native bridge (P/Invoke for iOS, JNI for Android). In the Unity Editor, a stub implementation logs warnings so your code compiles and runs without a device.
The typical flow is:
- Initialize the SDK with an ASR bundle (acoustic model)
- Create a decoding graph from a list of phrases
- Prepare the recognizer with the decoding graph
- Start listening; the recognizer captures audio and decodes in real time
- Receive partial results as the user speaks
- Receive the final response when VAD detects end of speech
Before You Start
We recommend reviewing the pages under Overview section in the main KeenASR documentation, in particular the Introduction, Getting Started, and the Glossary which explain core concepts (ASR bundles, decoding graphs, VAD, pronunciation scoring) that apply across all platforms.
