---
description: Unofficial Capacitor plugin for the Google ML Kit GenAI SDK to transcribe spoken words into text on-device with Gemini Nano on Android.
title: Capacitor ML Kit GenAI Speech Recognition Plugin - Capawesome
image: https://capawesome.io/docs/assets/images/social/sdks/capacitor/mlkit/genai-speech-recognition.png
---

<!doctype html> 

[Skip to content ](#capacitor-ml-kit-genai-speech-recognition-plugin) 

[🔐 Introducing the **Capacitor Vault** plugin — store secrets behind biometrics or a device passcode. ](/blog/announcing-the-capacitor-vault-plugin/) 

* [ SDKs ](/docs/sdks/)
* [ Formbricks ](/docs/sdks/capacitor/formbricks/)
* [ Geocoder ](/docs/sdks/capacitor/geocoder/)
* [ Google Sign-In ](/docs/sdks/capacitor/google-sign-in/)
* [ Grafana Faro ](/docs/sdks/capacitor/grafana-faro/)
* [ Gyroscope ](/docs/sdks/capacitor/gyroscope/)
* [ Haptics ](/docs/sdks/capacitor/haptics/)
* [ Home Indicator ](/docs/sdks/capacitor/home-indicator/)
* [ In-App Browser ](/docs/sdks/capacitor/in-app-browser/)
* [ Install Referrer ](/docs/sdks/capacitor/install-referrer/)
* [ Keep Awake ](/docs/sdks/capacitor/keep-awake/)
* [ libSQL ](/docs/sdks/capacitor/libsql/)
* [ Light Sensor ](/docs/sdks/capacitor/light-sensor/)
* [ Live Update ](/docs/sdks/capacitor/live-update/)
* [ Localization ](/docs/sdks/capacitor/localization/)
* [ Mail Composer ](/docs/sdks/capacitor/mail-composer/)
* [ Managed Configurations ](/docs/sdks/capacitor/managed-configurations/)
* [ Maps Launcher ](/docs/sdks/capacitor/maps-launcher/)
* [ Media Session ](/docs/sdks/capacitor/media-session/)
* [ ML Kit ](/docs/sdks/capacitor/mlkit/)
* [ Usage ](#usage)
* [ API ](#api)
* [ Type Aliases ](#type-aliases)
* [ Enums ](#enums)
* [ FAQ ](#faq)
* [ Related Plugins ](#related-plugins)
* [ Terms & Privacy ](#terms-privacy)
* [ Newsletter ](#newsletter)
* [ Changelog ](#changelog)
* [ License ](#license)
* [ GenAI Summarization ](/docs/sdks/capacitor/mlkit/genai-summarization/)
* [ Image Labeling ](/docs/sdks/capacitor/mlkit/image-labeling/)
* [ Language Identification ](/docs/sdks/capacitor/mlkit/language-identification/)
* [ Object Detection ](/docs/sdks/capacitor/mlkit/object-detection/)
* [ Pose Detection ](/docs/sdks/capacitor/mlkit/pose-detection/)
* [ Selfie Segmentation ](/docs/sdks/capacitor/mlkit/selfie-segmentation/)
* [ Smart Reply ](/docs/sdks/capacitor/mlkit/smart-reply/)
* [ Subject Segmentation ](/docs/sdks/capacitor/mlkit/subject-segmentation/)
* [ Text Recognition ](/docs/sdks/capacitor/mlkit/text-recognition/)
* [ Translation ](/docs/sdks/capacitor/mlkit/translation/)
* [ Navigation Bar ](/docs/sdks/capacitor/navigation-bar/)
* [ Network ](/docs/sdks/capacitor/network/)
* [ NFC ](/docs/sdks/capacitor/nfc/)
* [ Node.js ](/docs/sdks/capacitor/nodejs/)
* [ OAuth ](/docs/sdks/capacitor/oauth/)
* [ Passkeys ](/docs/sdks/capacitor/passkeys/)
* [ Password Autofill ](/docs/sdks/capacitor/password-autofill/)
* [ PDF Generator ](/docs/sdks/capacitor/pdf-generator/)
* [ PDF Viewer ](/docs/sdks/capacitor/pdf-viewer/)
* [ Pedometer ](/docs/sdks/capacitor/pedometer/)
* [ Permissions ](/docs/sdks/capacitor/permissions/)
* [ Phone Dialer ](/docs/sdks/capacitor/phone-dialer/)
* [ Photo Editor ](/docs/sdks/capacitor/photo-editor/)
* [ Photo Manipulator ](/docs/sdks/capacitor/photo-manipulator/)
* [ PixLive ](/docs/sdks/capacitor/pixlive/)
* [ PostHog ](/docs/sdks/capacitor/posthog/)
* [ Printer ](/docs/sdks/capacitor/printer/)
* [ Privacy Screen ](/docs/sdks/capacitor/privacy-screen/)
* [ Proximity Sensor ](/docs/sdks/capacitor/proximity-sensor/)
* [ Purchases ](/docs/sdks/capacitor/purchases/)
* [ RealtimeKit ](/docs/sdks/capacitor/realtimekit/)
* [ Root Detection ](/docs/sdks/capacitor/root-detection/)
* [ Screen Brightness ](/docs/sdks/capacitor/screen-brightness/)
* [ Screen Orientation ](/docs/sdks/capacitor/screen-orientation/)
* [ Screen Reader ](/docs/sdks/capacitor/screen-reader/)
* [ Screenshot ](/docs/sdks/capacitor/screenshot/)
* [ Secure Preferences ](/docs/sdks/capacitor/secure-preferences/)
* [ Settings Launcher ](/docs/sdks/capacitor/settings-launcher/)
* [ Shake ](/docs/sdks/capacitor/shake/)
* [ Silent Mode ](/docs/sdks/capacitor/silent-mode/)
* [ SIM ](/docs/sdks/capacitor/sim/)
* [ SMS Composer ](/docs/sdks/capacitor/sms-composer/)
* [ Speech Recognition ](/docs/sdks/capacitor/speech-recognition/)
* [ Speech Synthesis ](/docs/sdks/capacitor/speech-synthesis/)
* [ Share Target ](/docs/sdks/capacitor/share-target/)
* [ Square Mobile Payments ](/docs/sdks/capacitor/square-mobile-payments/)
* [ SQLite ](/docs/sdks/capacitor/sqlite/)
* [ Superwall ](/docs/sdks/capacitor/superwall/)
* [ System WebView ](/docs/sdks/capacitor/system-webview/)
* [ Text Interaction ](/docs/sdks/capacitor/text-interaction/)
* [ Text Zoom ](/docs/sdks/capacitor/text-zoom/)
* [ Thermal State ](/docs/sdks/capacitor/thermal-state/)
* [ Toast ](/docs/sdks/capacitor/toast/)
* [ Torch ](/docs/sdks/capacitor/torch/)
* [ Vault ](/docs/sdks/capacitor/vault/)
* [ Volume ](/docs/sdks/capacitor/volume/)
* [ Wallet ](/docs/sdks/capacitor/wallet/)
* [ Wifi ](/docs/sdks/capacitor/wifi/)
* [ Zip ](/docs/sdks/capacitor/zip/)
* [ Cordova ](/docs/sdks/cordova/)
* [ Cloud ](/docs/cloud/)
* [ Integrations ](/docs/cloud/live-updates/integrations/)
* Concepts
* Reference
* [ Troubleshooting ](/docs/cloud/live-updates/troubleshooting/)
* [ FAQ ](/docs/cloud/live-updates/faq/)
* [ Native Builds ](/docs/cloud/native-builds/)
* [ Set Up Environments ](/docs/cloud/native-builds/environments/)
* [ Overwrite Native Configurations ](/docs/cloud/native-builds/native-configurations/)
* [ Auto-Increment Build Numbers ](/docs/cloud/native-builds/auto-incrementing-build-numbers/)
* [ Configure the Web Build Script ](/docs/cloud/native-builds/web-build-script/)
* [ Build from a Monorepo ](/docs/cloud/native-builds/monorepo/)
* [ Use pnpm, Yarn, or bun ](/docs/cloud/native-builds/package-managers/)
* [ Install Private npm Packages ](/docs/cloud/native-builds/npm-private-registry/)
* [ Override the Java Version ](/docs/cloud/native-builds/override-java-version/)
* [ Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/custom-ios-provisioning-profiles/)
* [ Build without Git ](/docs/cloud/native-builds/build-without-git/)
* [ Access Git Behind a Firewall ](/docs/cloud/native-builds/firewall-access/)
* [ Integrations ](/docs/cloud/native-builds/integrations/)
* Reference
* [ Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [ FAQ ](/docs/cloud/native-builds/faq/)
* [ App Store Publishing ](/docs/cloud/app-store-publishing/)
* [ Submit a Build ](/docs/cloud/app-store-publishing/submit-a-build/)
* [ Submit Automatically After a Build ](/docs/cloud/app-store-publishing/submit-automatically/)
* [ Troubleshooting ](/docs/cloud/app-store-publishing/troubleshooting/)
* [ FAQ ](/docs/cloud/app-store-publishing/faq/)
* [ Automations ](/docs/cloud/automations/)
* [ Reference ](/docs/cloud/automations/reference/)
* [ Troubleshooting ](/docs/cloud/automations/troubleshooting/)
* [ FAQ ](/docs/cloud/automations/faq/)
* [ Assist ](/docs/cloud/assist/)
* [ CLI ](/docs/cloud/cli/)
* APIs and SDKs
* [ Webhooks ](/docs/cloud/webhooks/)
* [ Integrations ](/docs/cloud/integrations/)
* Account
* [ Organization ](/docs/cloud/organizations/)
* [ Two-Factor Enforcement ](/docs/cloud/organizations/two-factor-authentication/)
* [ Audit Logs ](/docs/cloud/organizations/audit-logs/)
* [ Billing ](/docs/cloud/organizations/billing/)
* [ License Keys ](/docs/cloud/license-keys/)
* [ AI ](/docs/ai/)
* [ Insiders ](/docs/insiders/)
* [ Billing & Plans ](/docs/insiders/billing-and-plans/)
* [ FAQ ](/docs/insiders/faq/)
* [ License ](https://capawesome.io/legal/eula/)
* [ Support ](/docs/support/)
* [ Contributing ](/docs/contributing/)
* Contributing code
* [ Code of Conduct ](/docs/contributing/code-of-conduct/)
* [ Questions ](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion#creating-a-discussion)
* [ Blog ](/blog/)
* Categories

* [ Usage ](#usage)
* [ API ](#api)
* [ Type Aliases ](#type-aliases)
* [ Enums ](#enums)
* [ FAQ ](#faq)
* [ Related Plugins ](#related-plugins)
* [ Terms & Privacy ](#terms-privacy)
* [ Newsletter ](#newsletter)
* [ Changelog ](#changelog)
* [ License ](#license)

# Capacitor ML Kit GenAI Speech Recognition Plugin[¶](#capacitor-ml-kit-genai-speech-recognition-plugin "Permanent link")

Unofficial Capacitor plugin for [ML Kit GenAI Speech Recognition](https://developers.google.com/ml-kit/genai/speech-recognition).[1](#fn:1)

> \[!WARNING\] The ML Kit GenAI Speech Recognition API is currently in **alpha**. The API surface and behavior may change in future releases and breaking changes are expected. Additionally, the advanced recognition mode is currently only available on a very limited set of devices (e.g. Pixel 10).

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Use Cases[¶](#use-cases "Permanent link")

The GenAI Speech Recognition plugin is typically used to transcribe spoken words into text in real time, for example:

* **Voice input**: Let users dictate messages, notes or search queries instead of typing.
* **Live transcription**: Transcribe meetings, lectures or interviews on-device.
* **Voice commands**: Build hands-free experiences that react to spoken input.

## Requirements[¶](#requirements "Permanent link")

This plugin performs speech recognition entirely on-device. It is only available on Android and supports two recognition modes with different requirements:

* **Basic mode**: Speech recognition using a traditional speech model. Requires Android API level 31 or higher. Supported locales: `en-US`, `fr-FR` (beta), `it-IT` (beta), `de-DE` (beta), `es-ES` (beta), `hi-IN` (beta), `ja-JP` (beta), `pt-BR` (beta), `tr-TR` (beta), `pl-PL` (beta), `cmn-Hans-CN` (beta), `ko-KR` (beta), `cmn-Hant-TW` (beta), `ru-RU` (beta), `vi-VN` (beta).
* **Advanced mode**: Speech recognition using a GenAI model. Currently only available on a very limited set of devices (e.g. Pixel 10). Supported locales: `en-US`, `ko-KR`, `es-ES`, `fr-FR`, `de-DE`, `it-IT`, `pt-PT`, `cmn-Hans-CN`, `cmn-Hant-TW`, `ja-JP`, `th-TH`, `ru-RU`, `nl-NL` (beta), `da-DK` (beta), `sv-SE` (beta), `pl-PL` (beta), `hi-IN` (beta), `vi-VN` (beta), `id-ID` (beta), `ar-SA` (beta), `tr-TR` (beta).

Use the `checkFeatureStatus(...)` method to check whether the feature is available on the device for the configured mode and locale.

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 8.x.x          | \>=8.x.x          | Active support |

## Installation[¶](#installation "Permanent link")

You can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-0-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-1-1)Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capacitor-mlkit/genai-speech-recognition` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:

`[](#%5F%5Fcodelineno-2-1)npm install @capacitor-mlkit/genai-speech-recognition
[](#%5F%5Fcodelineno-2-2)npx cap sync
`

### Android[¶](#android "Permanent link")

#### API level[¶](#api-level "Permanent link")

This plugin requires a minimum API level of 26\. Make sure to set the `minSdkVersion` in your `variables.gradle` file to at least `26`. Note that the basic recognition mode is only supported on devices with API level 31 or higher.

#### Permissions[¶](#permissions "Permanent link")

The plugin declares the `android.permission.RECORD_AUDIO` permission in its manifest, so no manual configuration is needed. The microphone permission is requested automatically when you start a recognition session. You can also check and request the permission manually using the `checkPermissions()` and `requestPermissions()` methods.

#### Variables[¶](#variables "Permanent link")

This plugin will use the following project variables (defined in your app’s `variables.gradle` file):

* `$mlkitGenaiSpeechRecognitionVersion` version of `com.google.mlkit:genai-speech-recognition` (default: `1.0.0-alpha1`)
* `$kotlinVersion` version of the Kotlin Gradle plugin (default: `2.2.20`)

## Usage[¶](#usage "Permanent link")

The following example shows how to check the feature status, download the feature and run a speech recognition session.

### Check the feature status[¶](#check-the-feature-status "Permanent link")

Before using the speech recognition feature, check whether it is available on the device. The feature availability depends on the configured mode and locale:

`[](#%5F%5Fcodelineno-3-1)import {
[](#%5F%5Fcodelineno-3-2)  FeatureStatus,
[](#%5F%5Fcodelineno-3-3)  GenAiSpeechRecognition,
[](#%5F%5Fcodelineno-3-4)  RecognitionMode,
[](#%5F%5Fcodelineno-3-5)} from '@capacitor-mlkit/genai-speech-recognition';
[](#%5F%5Fcodelineno-3-6)
[](#%5F%5Fcodelineno-3-7)const checkFeatureStatus = async () => {
[](#%5F%5Fcodelineno-3-8)  const { featureStatus } = await GenAiSpeechRecognition.checkFeatureStatus({
[](#%5F%5Fcodelineno-3-9)    locale: 'en-US',
[](#%5F%5Fcodelineno-3-10)    mode: RecognitionMode.Basic,
[](#%5F%5Fcodelineno-3-11)  });
[](#%5F%5Fcodelineno-3-12)  return featureStatus === FeatureStatus.Available;
[](#%5F%5Fcodelineno-3-13)};
`

### Download the feature[¶](#download-the-feature "Permanent link")

If the feature status is `DOWNLOADABLE`, download the feature before using it. Add a listener for the `downloadProgress` event to get notified about the download progress:

`[](#%5F%5Fcodelineno-4-1)import { GenAiSpeechRecognition, RecognitionMode } from '@capacitor-mlkit/genai-speech-recognition';
[](#%5F%5Fcodelineno-4-2)
[](#%5F%5Fcodelineno-4-3)const downloadFeature = async () => {
[](#%5F%5Fcodelineno-4-4)  await GenAiSpeechRecognition.addListener('downloadProgress', event => {
[](#%5F%5Fcodelineno-4-5)    console.log('Total bytes downloaded:', event.totalBytesDownloaded);
[](#%5F%5Fcodelineno-4-6)  });
[](#%5F%5Fcodelineno-4-7)  await GenAiSpeechRecognition.downloadFeature({
[](#%5F%5Fcodelineno-4-8)    locale: 'en-US',
[](#%5F%5Fcodelineno-4-9)    mode: RecognitionMode.Basic,
[](#%5F%5Fcodelineno-4-10)  });
[](#%5F%5Fcodelineno-4-11)};
`

### Start and stop a recognition session[¶](#start-and-stop-a-recognition-session "Permanent link")

Start a recognition session with `startRecognition(...)`. The audio is captured from the device microphone and the microphone permission is requested automatically if it has not been granted yet. Add listeners for the `partialResult` and `finalResult` events to receive the recognition results and for the `error` event to get notified about errors that occur during the session:

`[](#%5F%5Fcodelineno-5-1)import { GenAiSpeechRecognition, RecognitionMode } from '@capacitor-mlkit/genai-speech-recognition';
[](#%5F%5Fcodelineno-5-2)
[](#%5F%5Fcodelineno-5-3)const startRecognition = async () => {
[](#%5F%5Fcodelineno-5-4)  await GenAiSpeechRecognition.addListener('partialResult', event => {
[](#%5F%5Fcodelineno-5-5)    console.log('Partial result:', event.text);
[](#%5F%5Fcodelineno-5-6)  });
[](#%5F%5Fcodelineno-5-7)  await GenAiSpeechRecognition.addListener('finalResult', event => {
[](#%5F%5Fcodelineno-5-8)    console.log('Final result:', event.text);
[](#%5F%5Fcodelineno-5-9)  });
[](#%5F%5Fcodelineno-5-10)  await GenAiSpeechRecognition.addListener('error', event => {
[](#%5F%5Fcodelineno-5-11)    console.error('Error:', event.message);
[](#%5F%5Fcodelineno-5-12)  });
[](#%5F%5Fcodelineno-5-13)  await GenAiSpeechRecognition.startRecognition({
[](#%5F%5Fcodelineno-5-14)    locale: 'en-US',
[](#%5F%5Fcodelineno-5-15)    mode: RecognitionMode.Basic,
[](#%5F%5Fcodelineno-5-16)  });
[](#%5F%5Fcodelineno-5-17)};
[](#%5F%5Fcodelineno-5-18)
[](#%5F%5Fcodelineno-5-19)const stopRecognition = async () => {
[](#%5F%5Fcodelineno-5-20)  await GenAiSpeechRecognition.stopRecognition();
[](#%5F%5Fcodelineno-5-21)};
`

## API[¶](#api "Permanent link")

* [checkFeatureStatus(...)](#checkfeaturestatus)
* [checkPermissions()](#checkpermissions)
* [downloadFeature(...)](#downloadfeature)
* [requestPermissions()](#requestpermissions)
* [startRecognition(...)](#startrecognition)
* [stopRecognition()](#stoprecognition)
* [addListener('downloadProgress', ...)](#addlistenerdownloadprogress-)
* [addListener('error', ...)](#addlistenererror-)
* [addListener('finalResult', ...)](#addlistenerfinalresult-)
* [addListener('partialResult', ...)](#addlistenerpartialresult-)
* [removeAllListeners()](#removealllisteners)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
* [Enums](#enums)

### checkFeatureStatus(...)[¶](#checkfeaturestatus "Permanent link")

`[](#%5F%5Fcodelineno-6-1)checkFeatureStatus(options?: FeatureOptions | undefined) => Promise<CheckFeatureStatusResult>
`

Check the current availability status of the speech recognition feature.

The feature availability depends on the configured mode and locale. If the status is `DOWNLOADABLE`, you can download the feature using `downloadFeature(...)`.

Only available on Android.

| Param       | Type                              |
| ----------- | --------------------------------- |
| **options** | [FeatureOptions](#featureoptions) |

**Returns:** `Promise<[CheckFeatureStatusResult](#checkfeaturestatusresult)>`

**Since:** 8.2.0

---

### checkPermissions()[¶](#checkpermissions "Permanent link")

`[](#%5F%5Fcodelineno-7-1)checkPermissions() => Promise<PermissionStatus>
`

Check the status of the microphone permission.

Only available on Android.

**Returns:** `Promise<[PermissionStatus](#permissionstatus)>`

**Since:** 8.2.0

---

### downloadFeature(...)[¶](#downloadfeature "Permanent link")

`[](#%5F%5Fcodelineno-8-1)downloadFeature(options?: FeatureOptions | undefined) => Promise<void>
`

Download the speech recognition feature.

The `downloadProgress` event listener will notify you about the download progress. The returned promise resolves when the download is complete or the feature is already available.

Only available on Android.

| Param       | Type                              |
| ----------- | --------------------------------- |
| **options** | [FeatureOptions](#featureoptions) |

**Since:** 8.2.0

---

### requestPermissions()[¶](#requestpermissions "Permanent link")

`[](#%5F%5Fcodelineno-9-1)requestPermissions() => Promise<PermissionStatus>
`

Request the microphone permission.

Only available on Android.

**Returns:** `Promise<[PermissionStatus](#permissionstatus)>`

**Since:** 8.2.0

---

### startRecognition(...)[¶](#startrecognition "Permanent link")

`[](#%5F%5Fcodelineno-10-1)startRecognition(options?: FeatureOptions | undefined) => Promise<void>
`

Start a speech recognition session.

The audio is captured from the device microphone. If the microphone permission has not been granted yet, it will be requested automatically. The `partialResult` and `finalResult` event listeners will notify you about the recognition results. The `error` event listener will notify you about errors that occur during the session.

Rejects with the `RECOGNITION_ALREADY_RUNNING` error code if a recognition session is already running.

Only available on Android.

| Param       | Type                              |
| ----------- | --------------------------------- |
| **options** | [FeatureOptions](#featureoptions) |

**Since:** 8.2.0

---

### stopRecognition()[¶](#stoprecognition "Permanent link")

`[](#%5F%5Fcodelineno-11-1)stopRecognition() => Promise<void>
`

Stop the current speech recognition session.

Only available on Android.

**Since:** 8.2.0

---

### addListener('downloadProgress', ...)[¶](#addlistenerdownloadprogress "Permanent link")

`[](#%5F%5Fcodelineno-12-1)addListener(eventName: 'downloadProgress', listenerFunc: (event: DownloadProgressEvent) => void) => Promise<PluginListenerHandle>
`

Called while the speech recognition feature is being downloaded.

Only available on Android.

| Param            | Type                                                             |
| ---------------- | ---------------------------------------------------------------- |
| **eventName**    | 'downloadProgress'                                               |
| **listenerFunc** | (event: [DownloadProgressEvent](#downloadprogressevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 8.2.0

---

### addListener('error', ...)[¶](#addlistenererror "Permanent link")

`[](#%5F%5Fcodelineno-13-1)addListener(eventName: 'error', listenerFunc: (event: ErrorEvent) => void) => Promise<PluginListenerHandle>
`

Called when an error occurs during a recognition session.

Only available on Android.

| Param            | Type                                       |
| ---------------- | ------------------------------------------ |
| **eventName**    | 'error'                                    |
| **listenerFunc** | (event: [ErrorEvent](#errorevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 8.2.0

---

### addListener('finalResult', ...)[¶](#addlistenerfinalresult "Permanent link")

`[](#%5F%5Fcodelineno-14-1)addListener(eventName: 'finalResult', listenerFunc: (event: RecognitionResultEvent) => void) => Promise<PluginListenerHandle>
`

Called when a final recognition result is available.

Only available on Android.

| Param            | Type                                                               |
| ---------------- | ------------------------------------------------------------------ |
| **eventName**    | 'finalResult'                                                      |
| **listenerFunc** | (event: [RecognitionResultEvent](#recognitionresultevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 8.2.0

---

### addListener('partialResult', ...)[¶](#addlistenerpartialresult "Permanent link")

`[](#%5F%5Fcodelineno-15-1)addListener(eventName: 'partialResult', listenerFunc: (event: RecognitionResultEvent) => void) => Promise<PluginListenerHandle>
`

Called when a partial recognition result is available.

Only available on Android.

| Param            | Type                                                               |
| ---------------- | ------------------------------------------------------------------ |
| **eventName**    | 'partialResult'                                                    |
| **listenerFunc** | (event: [RecognitionResultEvent](#recognitionresultevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 8.2.0

---

### removeAllListeners()[¶](#removealllisteners "Permanent link")

`[](#%5F%5Fcodelineno-16-1)removeAllListeners() => Promise<void>
`

Remove all listeners for this plugin.

**Since:** 8.2.0

---

### Interfaces[¶](#interfaces "Permanent link")

#### CheckFeatureStatusResult[¶](#checkfeaturestatusresult "Permanent link")

| Prop              | Type                            | Description                                                        | Since |
| ----------------- | ------------------------------- | ------------------------------------------------------------------ | ----- |
| **featureStatus** | [FeatureStatus](#featurestatus) | The current availability status of the speech recognition feature. | 8.2.0 |

#### FeatureOptions[¶](#featureoptions "Permanent link")

The feature availability depends on the configured mode and locale. Therefore, `checkFeatureStatus(...)` and `downloadFeature(...)` take the same base options as `startRecognition(...)`.

| Prop       | Type                                | Description                                                                                                          | Default               | Since |
| ---------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------- | ----- |
| **locale** | string                              | The locale of the speech to recognize as a BCP-47 language tag. The supported locales depend on the configured mode. | The device locale.    | 8.2.0 |
| **mode**   | [RecognitionMode](#recognitionmode) | The speech recognition mode.                                                                                         | RecognitionMode.Basic | 8.2.0 |

#### PermissionStatus[¶](#permissionstatus "Permanent link")

| Prop           | Type                                | Description                              | Since |
| -------------- | ----------------------------------- | ---------------------------------------- | ----- |
| **microphone** | [PermissionState](#permissionstate) | The status of the microphone permission. | 8.2.0 |

#### PluginListenerHandle[¶](#pluginlistenerhandle "Permanent link")

| Prop       | Type                |
| ---------- | ------------------- |
| **remove** | () => Promise<void> |

#### DownloadProgressEvent[¶](#downloadprogressevent "Permanent link")

| Prop                     | Type   | Description                                  | Since |
| ------------------------ | ------ | -------------------------------------------- | ----- |
| **totalBytesDownloaded** | number | The total number of bytes downloaded so far. | 8.2.0 |

#### ErrorEvent[¶](#errorevent "Permanent link")

| Prop        | Type   | Description        | Since |
| ----------- | ------ | ------------------ | ----- |
| **message** | string | The error message. | 8.2.0 |

#### RecognitionResultEvent[¶](#recognitionresultevent "Permanent link")

| Prop     | Type   | Description          | Since |
| -------- | ------ | -------------------- | ----- |
| **text** | string | The recognized text. | 8.2.0 |

### Type Aliases[¶](#type-aliases "Permanent link")

#### PermissionState[¶](#permissionstate "Permanent link")

`'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'`

#### StartRecognitionOptions[¶](#startrecognitionoptions "Permanent link")

`[FeatureOptions](#featureoptions)`

### Enums[¶](#enums "Permanent link")

#### FeatureStatus[¶](#featurestatus "Permanent link")

| Members          | Value          | Description                                               | Since |
| ---------------- | -------------- | --------------------------------------------------------- | ----- |
| **Available**    | 'AVAILABLE'    | The feature is available to use.                          | 8.2.0 |
| **Downloadable** | 'DOWNLOADABLE' | The feature can be downloaded using downloadFeature(...). | 8.2.0 |
| **Downloading**  | 'DOWNLOADING'  | The feature is currently being downloaded.                | 8.2.0 |
| **Unavailable**  | 'UNAVAILABLE'  | The feature is not available on this device.              | 8.2.0 |

#### RecognitionMode[¶](#recognitionmode "Permanent link")

| Members      | Value      | Description                                                                                                                                              | Since |
| ------------ | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **Advanced** | 'ADVANCED' | Speech recognition using a GenAI model. This mode provides the best quality but is currently only available on a limited set of devices (e.g. Pixel 10). | 8.2.0 |
| **Basic**    | 'BASIC'    | Speech recognition using a traditional speech model. This mode requires Android API level 31 or higher.                                                  | 8.2.0 |

## FAQ[¶](#faq "Permanent link")

### What are the requirements to use this plugin?[¶](#what-are-the-requirements-to-use-this-plugin "Permanent link")

The speech recognition is performed entirely on-device. The basic mode requires Android API level 31 or higher. The advanced mode uses a GenAI model and is currently only available on a very limited set of devices (e.g. Pixel 10). Use the `checkFeatureStatus(...)` method to check whether the feature is available on the device (see [Requirements](#requirements)).

### Why is this plugin only available on Android?[¶](#why-is-this-plugin-only-available-on-android "Permanent link")

The ML Kit GenAI APIs are currently only available on Android. On iOS and Web, all methods reject with an appropriate error.

### What is the difference between the basic and advanced mode?[¶](#what-is-the-difference-between-the-basic-and-advanced-mode "Permanent link")

The basic mode uses a traditional on-device speech model and is supported on Android devices with API level 31 or higher. The advanced mode uses a GenAI model, which provides the best quality but is currently only available on a very limited set of devices (e.g. Pixel 10). Each mode supports a different set of locales (see [Requirements](#requirements)).

### How do I receive the recognition results?[¶](#how-do-i-receive-the-recognition-results "Permanent link")

Add listeners for the `partialResult` and `finalResult` events before calling `startRecognition(...)`. The `partialResult` event is called with intermediate results while the user is speaking. The `finalResult` event is called with the final recognized text.

### Can I use this plugin with Ionic, React, Vue or Angular?[¶](#can-i-use-this-plugin-with-ionic-react-vue-or-angular "Permanent link")

Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.

## Related Plugins[¶](#related-plugins "Permanent link")

* [Translation](https://capawesome.io/docs/sdks/capacitor/mlkit/translation/): Unofficial Capacitor plugin for ML Kit Translation.
* [Language Identification](https://capawesome.io/docs/sdks/capacitor/mlkit/language-identification/): Unofficial Capacitor plugin for ML Kit Language Identification.

## Terms & Privacy[¶](#terms-privacy "Permanent link")

This plugin uses the [Google ML Kit](https://developers.google.com/ml-kit):

* [Terms & Privacy](https://developers.google.com/ml-kit/terms)
* [Android Data Disclosure](https://developers.google.com/ml-kit/android-data-disclosure)
* [iOS Data Disclosure](https://developers.google.com/ml-kit/ios-data-disclosure)

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-mlkit/blob/main/packages/genai-speech-recognition/CHANGELOG.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-mlkit/blob/main/packages/genai-speech-recognition/LICENSE).

---

1. This project is not affiliated with, endorsed by, sponsored by, or approved by Google LLC or any of their affiliates or subsidiaries. [↩](#fnref:1 "Jump back to footnote 1 in the text")

July 10, 2026 

Back to top

```json
{"@context": "https://schema.org", "@graph": [{"@type": "TechArticle", "@id": "https://capawesome.io/docs/sdks/capacitor/mlkit/genai-speech-recognition/#article", "headline": "Capacitor ML Kit GenAI Speech Recognition Plugin", "name": "Capacitor ML Kit GenAI Speech Recognition Plugin", "description": "Unofficial Capacitor plugin for the Google ML Kit GenAI SDK to transcribe spoken words into text on-device with Gemini Nano on Android.", "inLanguage": "en", "url": "https://capawesome.io/docs/sdks/capacitor/mlkit/genai-speech-recognition/", "mainEntityOfPage": "https://capawesome.io/docs/sdks/capacitor/mlkit/genai-speech-recognition/", "author": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "publisher": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "about": {"@id": "https://capawesome.io/docs/sdks/capacitor/mlkit/genai-speech-recognition/#software"}}, {"@type": "SoftwareSourceCode", "@id": "https://capawesome.io/docs/sdks/capacitor/mlkit/genai-speech-recognition/#software", "name": "Capacitor ML Kit GenAI Speech Recognition Plugin", "description": "Unofficial Capacitor plugin for the Google ML Kit GenAI SDK to transcribe spoken words into text on-device with Gemini Nano on Android.", "url": "https://capawesome.io/docs/sdks/capacitor/mlkit/genai-speech-recognition/", "programmingLanguage": "TypeScript", "runtimePlatform": "Capacitor", "codeRepository": "https://github.com/capawesome-team", "author": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}, "publisher": {"@type": "Organization", "name": "Capawesome", "url": "https://capawesome.io", "logo": {"@type": "ImageObject", "url": "https://capawesome.io/assets/images/logo.svg"}}}]}
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "What are the requirements to use this plugin?", "acceptedAnswer": {"@type": "Answer", "text": "The speech recognition is performed entirely on-device. The basic mode requires Android API level 31 or higher. The advanced mode uses a GenAI model and is currently only available on a very limited set of devices (e.g. Pixel 10). Use the checkFeatureStatus(...) method to check whether the feature is available on the device (see Requirements)."}}, {"@type": "Question", "name": "Why is this plugin only available on Android?", "acceptedAnswer": {"@type": "Answer", "text": "The ML Kit GenAI APIs are currently only available on Android. On iOS and Web, all methods reject with an appropriate error."}}, {"@type": "Question", "name": "What is the difference between the basic and advanced mode?", "acceptedAnswer": {"@type": "Answer", "text": "The basic mode uses a traditional on-device speech model and is supported on Android devices with API level 31 or higher. The advanced mode uses a GenAI model, which provides the best quality but is currently only available on a very limited set of devices (e.g. Pixel 10). Each mode supports a different set of locales (see Requirements)."}}, {"@type": "Question", "name": "How do I receive the recognition results?", "acceptedAnswer": {"@type": "Answer", "text": "Add listeners for the partialResult and finalResult events before calling startRecognition(...). The partialResult event is called with intermediate results while the user is speaking. The finalResult event is called with the final recognized text."}}, {"@type": "Question", "name": "Can I use this plugin with Ionic, React, Vue or Angular?", "acceptedAnswer": {"@type": "Answer", "text": "Yes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects."}}], "url": "https://capawesome.io/docs/sdks/capacitor/mlkit/genai-speech-recognition/"}
```
