---
description: Capacitor plugin to transcribe speech into text (also known as speech-to-text) with advanced features like silence detection, contextual strings, and more.
title: Capacitor Speech Recognition Plugin for Android, iOS & Web - Capawesome
image: https://capawesome.io/docs/assets/images/social/plugins/speech-recognition.png
---

[ Skip to content](#capawesome-teamcapacitor-speech-recognition) 

[ 🎉 Introducing **Capawesome Platform** — one platform for Live Updates, Native Builds, App Store Publishing, and Insider SDKs.](https://capawesome.io) 

* [  Formbricks ](/docs/plugins/formbricks/)
* [  Geocoder ](/docs/plugins/geocoder/)
* [  Google Sign-In ](/docs/plugins/google-sign-in/)
* [  libSQL ](/docs/plugins/libsql/)
* [  Live Update ](/docs/plugins/live-update/)
* [  Managed Configurations ](/docs/plugins/managed-configurations/)
* [  Media Session ](/docs/plugins/media-session/)
* [  ML Kit ](/docs/plugins/mlkit/)
* [  NFC ](/docs/plugins/nfc/)
* [  OAuth ](/docs/plugins/oauth/)
* [  Pedometer ](/docs/plugins/pedometer/)
* [  Photo Editor ](/docs/plugins/photo-editor/)
* [  PostHog ](/docs/plugins/posthog/)
* [  Printer ](/docs/plugins/printer/)
* [  Purchases ](/docs/plugins/purchases/)
* [  RealtimeKit ](/docs/plugins/realtimekit/)
* [  Screen Orientation ](/docs/plugins/screen-orientation/)
* [  Screenshot ](/docs/plugins/screenshot/)
* [  Secure Preferences ](/docs/plugins/secure-preferences/)
* Speech Recognition [  Speech Recognition ](/docs/plugins/speech-recognition/)
* [  iOS ](#ios)
* [  Configuration ](#configuration)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Enums ](#enums)
* [  Changelog ](#changelog)
* [  Breaking Changes ](#breaking-changes)
* [  License ](#license)
* [  Speech Synthesis ](/docs/plugins/speech-synthesis/)
* [  Share Target ](/docs/plugins/share-target/)
* [  Square Mobile Payments ](/docs/plugins/square-mobile-payments/)
* [  SQLite ](/docs/plugins/sqlite/)
* [  Superwall ](/docs/plugins/superwall/)
* [  Torch ](/docs/plugins/torch/)
* [  Wifi ](/docs/plugins/wifi/)
* [  Zip ](/docs/plugins/zip/)
* [  Cloud ](/docs/cloud/)
* [  Live Updates ](/docs/cloud/live-updates/)
* Advanced
* Integrations
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Configuration ](/docs/cloud/native-builds/configuration/)
* [  Environments ](/docs/cloud/native-builds/environments/)
* Guides
* [  Sample Projects ](/docs/cloud/native-builds/sample-projects/)
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  Automations ](/docs/cloud/automations/)
* [  Assist ](/docs/cloud/assist/)
* Account
* Organizations
* [  Organization and User Management ](/docs/cloud/organizations/memberships/)
* [  Single Sign-On (SSO) ](/docs/cloud/organizations/sso/)
* [  Teams ](/docs/cloud/organizations/teams/)
* [  Two-Factor Authentication ](/docs/cloud/organizations/two-factor-authentication/)
* [  Integrations ](/docs/cloud/integrations/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Pricing ](https://capawesome.io/pricing/)
* [  FAQ ](/docs/cloud/faq/)
* [  Support ](/docs/cloud/support/)
* [  Contributing ](/docs/contributing/)
* [  LLMs ](/docs/llms/)
* [  Insiders ](/docs/insiders/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/insiders/support/)
* [  FAQ ](/docs/insiders/faq/)
* [  Blog ](/blog/)
* Categories

* [  iOS ](#ios)
* [  Configuration ](#configuration)
* [  Usage ](#usage)
* [  API ](#api)
* [  Type Aliases ](#type-aliases)
* [  Enums ](#enums)
* [  Changelog ](#changelog)
* [  Breaking Changes ](#breaking-changes)
* [  License ](#license)

# @capawesome-team/capacitor-speech-recognition[¶](#capawesome-teamcapacitor-speech-recognition "Permanent link")

Capacitor plugin to transcribe speech into text (also known as speech-to-text) with advanced features like silence detection, contextual strings, and more.

[ ![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/) 

## Features[¶](#features "Permanent link")

We are proud to offer one of the most complete and feature-rich Capacitor plugins for speech recognition. Here are some of the key features:

* 🖥️ **Cross-platform**: Supports Android, iOS and Web.
* 🌐 **Multiple Languages**: Supports many different languages.
* 🔑 **Permissions**: Check and request permissions for recording audio.
* 🔊 **Events**: Listen for events like `start`, `end`, `speechStart`, `speechEnd`, `error`, `partialResults`, and `results`.
* 🔇 **Silence Detection**: Automatically detects silence to stop the recording.
* 📊 **Silence Threshold**: Define what's considered "silence" for your recordings.
* 💬 **Contextual Strings**: Provide an array of phrases that should be recognized, even if they are not in the system vocabulary.
* 📱 **On-Device Recognition**: Force on-device-only speech recognition, query available on-device languages, and download language models.
* 🧠 **SpeechTranscriber**: Opt-in support for Apple's modern `SpeechTranscriber` API (iOS 26+) with fully on-device processing and no "Speech data will be sent to Apple" permission dialog.
* 🤝 **Compatibility**: Compatible with the [Audio Player](https://capawesome.io/docs/plugins/audio-player/), [Audio Recorder](https://capawesome.io/docs/plugins/audio-recorder/) and [Speech Synthesis](https://capawesome.io/docs/plugins/speech-synthesis/) plugins.
* ⚔️ **Battle-Tested**: Used in more than 250 projects.
* 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.
* 🔁 **Up-to-date**: Always supports the latest Capacitor version.
* ⭐️ **Support**: Priority support from the Capawesome Team.
* ✨ **Handcrafted**: Built from the ground up with care and expertise, not forked or AI-generated.

Missing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!

## 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/).

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

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

## Guides[¶](#guides "Permanent link")

* [Exploring the Capacitor Speech Recognition API](https://capawesome.io/blog/exploring-the-capacitor-speech-recognition-api/)

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

This plugin is only available to [Capawesome Insiders](https://capawesome.io/insiders/). First, make sure you have the Capawesome npm registry set up. You can do this by running the following commands:

`[](#%5F%5Fcodelineno-0-1)npm config set @capawesome-team:registry https://npm.registry.capawesome.io
[](#%5F%5Fcodelineno-0-2)npm config set //npm.registry.capawesome.io/:_authToken <YOUR_LICENSE_KEY>
`

**Attention**: Replace `<YOUR_LICENSE_KEY>` with the license key you received from Polar. If you don't have a license key yet, you can get one by becoming a [Capawesome Insider](https://capawesome.io/insiders/).

Next, 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-1-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-2-1)Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome-team/capacitor-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-3-1)npm install @capawesome-team/capacitor-speech-recognition
[](#%5F%5Fcodelineno-3-2)npx cap sync
`

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

#### Proguard[¶](#proguard "Permanent link")

If you are using Proguard, you need to add the following rules to your `proguard-rules.pro` file:

`[](#%5F%5Fcodelineno-4-1)-keep class io.capawesome.capacitorjs.plugins.** { *; }
`

### iOS[¶](#ios "Permanent link")

#### Privacy Descriptions[¶](#privacy-descriptions "Permanent link")

Add the `NSSpeechRecognitionUsageDescription` and `NSMicrophoneUsageDescription` keys to the `ios/App/App/Info.plist` file, which tells the user why the app needs access to speech recognition and the microphone:

`[](#%5F%5Fcodelineno-5-1)<key>NSSpeechRecognitionUsageDescription</key>
[](#%5F%5Fcodelineno-5-2)<string>Speech recognition is used to transcribe speech into text.</string>
[](#%5F%5Fcodelineno-5-3)<key>NSMicrophoneUsageDescription</key>
[](#%5F%5Fcodelineno-5-4)<string>Microphone is used to record audio for speech recognition.</string>
`

## Configuration[¶](#configuration "Permanent link")

No configuration required for this plugin.

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

`[](#%5F%5Fcodelineno-6-1)import { SpeechRecognition } from '@capawesome-team/capacitor-speech-recognition';
[](#%5F%5Fcodelineno-6-2)
[](#%5F%5Fcodelineno-6-3)const startListening = async () => {
[](#%5F%5Fcodelineno-6-4)  await SpeechRecognition.startListening({
[](#%5F%5Fcodelineno-6-5)    language: 'en-US',
[](#%5F%5Fcodelineno-6-6)    silenceThreshold: 2000,
[](#%5F%5Fcodelineno-6-7)  });
[](#%5F%5Fcodelineno-6-8)};
[](#%5F%5Fcodelineno-6-9)
[](#%5F%5Fcodelineno-6-10)const stopListening = async () => {
[](#%5F%5Fcodelineno-6-11)  await SpeechRecognition.stopListening();
[](#%5F%5Fcodelineno-6-12)};
[](#%5F%5Fcodelineno-6-13)
[](#%5F%5Fcodelineno-6-14)const checkPermissions = async () => {
[](#%5F%5Fcodelineno-6-15)  const { audioRecording, speechRecognition } = await SpeechRecognition.checkPermissions();
[](#%5F%5Fcodelineno-6-16)};
[](#%5F%5Fcodelineno-6-17)
[](#%5F%5Fcodelineno-6-18)const requestPermissions = async () => {
[](#%5F%5Fcodelineno-6-19)  const { audioRecording, speechRecognition } = await SpeechRecognition.requestPermissions({
[](#%5F%5Fcodelineno-6-20)    permissions: ['audioRecording', 'speechRecognition'],
[](#%5F%5Fcodelineno-6-21)  });
[](#%5F%5Fcodelineno-6-22)};
[](#%5F%5Fcodelineno-6-23)
[](#%5F%5Fcodelineno-6-24)const isAvailable = async () => {
[](#%5F%5Fcodelineno-6-25)  const { isAvailable } = await SpeechRecognition.isAvailable();
[](#%5F%5Fcodelineno-6-26)  return isAvailable;
[](#%5F%5Fcodelineno-6-27)};
[](#%5F%5Fcodelineno-6-28)
[](#%5F%5Fcodelineno-6-29)const isListening = async () => {
[](#%5F%5Fcodelineno-6-30)  const { isListening } = await SpeechRecognition.isListening();
[](#%5F%5Fcodelineno-6-31)  return isListening;
[](#%5F%5Fcodelineno-6-32)};
[](#%5F%5Fcodelineno-6-33)
[](#%5F%5Fcodelineno-6-34)const getLanguages = async () => {
[](#%5F%5Fcodelineno-6-35)  const { languages } = await SpeechRecognition.getLanguages();
[](#%5F%5Fcodelineno-6-36)  return languages;
[](#%5F%5Fcodelineno-6-37)};
[](#%5F%5Fcodelineno-6-38)
[](#%5F%5Fcodelineno-6-39)const addListeners = () => {
[](#%5F%5Fcodelineno-6-40)  SpeechRecognition.addListener('start', () => {
[](#%5F%5Fcodelineno-6-41)    console.log('Speech recognition started');
[](#%5F%5Fcodelineno-6-42)  });
[](#%5F%5Fcodelineno-6-43)  SpeechRecognition.addListener('end', () => {
[](#%5F%5Fcodelineno-6-44)    console.log('Speech recognition ended');
[](#%5F%5Fcodelineno-6-45)  });
[](#%5F%5Fcodelineno-6-46)  SpeechRecognition.addListener('error', (event) => {
[](#%5F%5Fcodelineno-6-47)    console.error('Speech recognition error:', event.message);
[](#%5F%5Fcodelineno-6-48)  });
[](#%5F%5Fcodelineno-6-49)  SpeechRecognition.addListener('partialResult', (event) => {
[](#%5F%5Fcodelineno-6-50)    console.log('Partial result:', event.result);
[](#%5F%5Fcodelineno-6-51)  });
[](#%5F%5Fcodelineno-6-52)  SpeechRecognition.addListener('result', (event) => {
[](#%5F%5Fcodelineno-6-53)    console.log('Final result:', event.result);
[](#%5F%5Fcodelineno-6-54)  });
[](#%5F%5Fcodelineno-6-55)  SpeechRecognition.addListener('soundLevel', (event) => {
[](#%5F%5Fcodelineno-6-56)    console.log('Sound level:', event.level);
[](#%5F%5Fcodelineno-6-57)  });
[](#%5F%5Fcodelineno-6-58)  SpeechRecognition.addListener('speechStart', () => {
[](#%5F%5Fcodelineno-6-59)    console.log('User started speaking');
[](#%5F%5Fcodelineno-6-60)  });
[](#%5F%5Fcodelineno-6-61)  SpeechRecognition.addListener('speechEnd', () => {
[](#%5F%5Fcodelineno-6-62)    console.log('User stopped speaking');
[](#%5F%5Fcodelineno-6-63)  });
[](#%5F%5Fcodelineno-6-64)};
[](#%5F%5Fcodelineno-6-65)
[](#%5F%5Fcodelineno-6-66)const removeAllListeners = async () => {
[](#%5F%5Fcodelineno-6-67)  await SpeechRecognition.removeAllListeners();
[](#%5F%5Fcodelineno-6-68)};
`

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

* [getLanguages()](#getlanguages)
* [getOnDeviceLanguages()](#getondevicelanguages)
* [downloadOnDeviceLanguage(...)](#downloadondevicelanguage)
* [isAvailable()](#isavailable)
* [isListening()](#islistening)
* [startListening(...)](#startlistening)
* [stopListening(...)](#stoplistening)
* [checkPermissions()](#checkpermissions)
* [requestPermissions(...)](#requestpermissions)
* [addListener('end', ...)](#addlistenerend-)
* [addListener('error', ...)](#addlistenererror-)
* [addListener('partialResult', ...)](#addlistenerpartialresult-)
* [addListener('result', ...)](#addlistenerresult-)
* [addListener('speechEnd', ...)](#addlistenerspeechend-)
* [addListener('speechStart', ...)](#addlistenerspeechstart-)
* [addListener('start', ...)](#addlistenerstart-)
* [addListener('soundLevel', ...)](#addlistenersoundlevel-)
* [removeAllListeners()](#removealllisteners)
* [Interfaces](#interfaces)
* [Type Aliases](#type-aliases)
* [Enums](#enums)

### getLanguages()[¶](#getlanguages "Permanent link")

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

Get the available languages for speech recognition.

**Attention**: On Android, this method is unfortunately not supported by all devices. If the method is not supported, the promise will never resolve. It's recommended to set a timeout for the promise.

Only available on Android and iOS.

**Returns:** `Promise<[GetLanguagesResult](#getlanguagesresult)>`

**Since:** 6.0.0

---

### getOnDeviceLanguages()[¶](#getondevicelanguages "Permanent link")

`[](#%5F%5Fcodelineno-8-1)getOnDeviceLanguages() => Promise<GetOnDeviceLanguagesResult>
`

Get the available on-device languages for speech recognition.

Only available on Android (SDK 33+) and iOS (26+).

**Returns:** `Promise<[GetOnDeviceLanguagesResult](#getondevicelanguagesresult)>`

**Since:** 8.1.0

---

### downloadOnDeviceLanguage(...)[¶](#downloadondevicelanguage "Permanent link")

`[](#%5F%5Fcodelineno-9-1)downloadOnDeviceLanguage(options: DownloadOnDeviceLanguageOptions, callback: DownloadOnDeviceLanguageCallback) => Promise<CallbackId>
`

Download an on-device language model for speech recognition.

**Note**: On Android, this might trigger user interaction to approve the download.

**Note**: On Android (SDK 33), the `callback` is never invoked because progress tracking is only available on SDK 34+. Use {@link getOnDeviceLanguages} to verify when the download completes.

Only available on Android (SDK 33+) and iOS (26+).

| Param        | Type                                                                  |
| ------------ | --------------------------------------------------------------------- |
| **options**  | [DownloadOnDeviceLanguageOptions](#downloadondevicelanguageoptions)   |
| **callback** | [DownloadOnDeviceLanguageCallback](#downloadondevicelanguagecallback) |

**Returns:** `Promise<string>`

**Since:** 8.1.0

---

### isAvailable()[¶](#isavailable "Permanent link")

`[](#%5F%5Fcodelineno-10-1)isAvailable() => Promise<IsAvailableResult>
`

Check if the speech recognizer is available on the device.

**Returns:** `Promise<[IsAvailableResult](#isavailableresult)>`

**Since:** 6.0.0

---

### isListening()[¶](#islistening "Permanent link")

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

Check if the speech recognizer is currently listening.

**Returns:** `Promise<[IsListeningResult](#islisteningresult)>`

**Since:** 6.0.0

---

### startListening(...)[¶](#startlistening "Permanent link")

`[](#%5F%5Fcodelineno-12-1)startListening(options?: StartListeningOptions | undefined) => Promise<void>
`

Start listening for speech.

| Param       | Type                                            |
| ----------- | ----------------------------------------------- |
| **options** | [StartListeningOptions](#startlisteningoptions) |

**Since:** 6.0.0

---

### stopListening(...)[¶](#stoplistening "Permanent link")

`[](#%5F%5Fcodelineno-13-1)stopListening(options?: StopListeningOptions | undefined) => Promise<void>
`

Stop listening for speech.

| Param       | Type                                          |
| ----------- | --------------------------------------------- |
| **options** | [StopListeningOptions](#stoplisteningoptions) |

**Since:** 6.0.0

---

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

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

Check permissions for the plugin.

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

**Since:** 6.0.0

---

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

`[](#%5F%5Fcodelineno-15-1)requestPermissions(permissions?: SpeechRecognitionPluginPermission | undefined) => Promise<PermissionStatus>
`

Request permissions for the plugin.

| Param           | Type                                                                    |
| --------------- | ----------------------------------------------------------------------- |
| **permissions** | [SpeechRecognitionPluginPermission](#speechrecognitionpluginpermission) |

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

**Since:** 6.0.0

---

### addListener('end', ...)[¶](#addlistenerend "Permanent link")

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

Called when the speech recognizer has stopped listening.

| Param            | Type       |
| ---------------- | ---------- |
| **eventName**    | 'end'      |
| **listenerFunc** | () => void |

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

**Since:** 6.0.0

---

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

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

Called when an error occurs.

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

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

**Since:** 6.0.0

---

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

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

Called when a partial result is available.

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

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

**Since:** 6.0.0

---

### addListener('result', ...)[¶](#addlistenerresult "Permanent link")

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

Called when the final results are available.

| Param            | Type                                         |
| ---------------- | -------------------------------------------- |
| **eventName**    | 'result'                                     |
| **listenerFunc** | (event: [ResultEvent](#resultevent)) => void |

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

**Since:** 6.0.0

---

### addListener('speechEnd', ...)[¶](#addlistenerspeechend "Permanent link")

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

Called when the user has stopped speaking.

Only available on Android and Web.

| Param            | Type        |
| ---------------- | ----------- |
| **eventName**    | 'speechEnd' |
| **listenerFunc** | () => void  |

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

**Since:** 6.0.0

---

### addListener('speechStart', ...)[¶](#addlistenerspeechstart "Permanent link")

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

Called when the user has started to speak.

Only available on Android and Web.

| Param            | Type          |
| ---------------- | ------------- |
| **eventName**    | 'speechStart' |
| **listenerFunc** | () => void    |

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

**Since:** 6.0.0

---

### addListener('start', ...)[¶](#addlistenerstart "Permanent link")

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

Called when the speech recognizer has started listening.

| Param            | Type       |
| ---------------- | ---------- |
| **eventName**    | 'start'    |
| **listenerFunc** | () => void |

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

**Since:** 6.0.0

---

### addListener('soundLevel', ...)[¶](#addlistenersoundlevel "Permanent link")

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

Called when the sound level changes during speech recognition.

**Attention**: There is no guarantee that this method will be called.

Only available on Android and iOS.

| Param            | Type                                                 |
| ---------------- | ---------------------------------------------------- |
| **eventName**    | 'soundLevel'                                         |
| **listenerFunc** | (event: [SoundLevelEvent](#soundlevelevent)) => void |

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

**Since:** 7.5.0

---

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

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

Remove all listeners for this plugin.

**Since:** 6.0.0

---

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

#### GetLanguagesResult[¶](#getlanguagesresult "Permanent link")

| Prop          | Type       | Description                                                             | Since |
| ------------- | ---------- | ----------------------------------------------------------------------- | ----- |
| **languages** | string\[\] | The supported languages for speech recognition as BCP-47 language tags. | 6.0.0 |

#### GetOnDeviceLanguagesResult[¶](#getondevicelanguagesresult "Permanent link")

| Prop                   | Type       | Description                                                                                                                                                       | Since |
| ---------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **installedLanguages** | string\[\] | The installed on-device languages as BCP-47 language tags.                                                                                                        | 8.1.0 |
| **pendingLanguages**   | string\[\] | The on-device languages whose download is scheduled or in progress as BCP-47 language tags. Only available on Android.                                            | 8.1.0 |
| **supportedLanguages** | string\[\] | The supported on-device languages as BCP-47 language tags. These languages can be downloaded for on-device use using the {@link downloadOnDeviceLanguage} method. | 8.1.0 |

#### DownloadOnDeviceLanguageOptions[¶](#downloadondevicelanguageoptions "Permanent link")

| Prop         | Type   | Description                                           | Since |
| ------------ | ------ | ----------------------------------------------------- | ----- |
| **language** | string | The BCP-47 language tag for the language to download. | 8.1.0 |

#### DownloadOnDeviceLanguageCallbackEvent[¶](#downloadondevicelanguagecallbackevent "Permanent link")

| Prop          | Type    | Description                                             | Since |
| ------------- | ------- | ------------------------------------------------------- | ----- |
| **progress**  | number  | The download progress, as a percentage between 0 and 1. | 8.1.0 |
| **completed** | boolean | Whether the download is completed or not.               | 8.1.0 |

#### IsAvailableResult[¶](#isavailableresult "Permanent link")

| Prop            | Type    | Description                                                      | Since |
| --------------- | ------- | ---------------------------------------------------------------- | ----- |
| **isAvailable** | boolean | Whether or not the speech recognizer is available on the device. | 6.0.0 |

#### IsListeningResult[¶](#islisteningresult "Permanent link")

| Prop            | Type    | Description                                                  | Since |
| --------------- | ------- | ------------------------------------------------------------ | ----- |
| **isListening** | boolean | Whether or not the speech recognizer is currently listening. | 6.0.0 |

#### StartListeningOptions[¶](#startlisteningoptions "Permanent link")

| Prop                             | Type                                          | Description                                                                                                                                                                                                                                                                                                                                                                                             | Default                      | Since |
| -------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | ----- |
| **audioSessionCategory**         | [AudioSessionCategory](#audiosessioncategory) | The audio session category to use for speech recognition. Only available on iOS.                                                                                                                                                                                                                                                                                                                        | AudioSessionCategory.Record  | 7.2.0 |
| **audioSessionMode**             | [AudioSessionMode](#audiosessionmode)         | The audio session mode for speech recognition. Only available on iOS.                                                                                                                                                                                                                                                                                                                                   | AudioSessionMode.Measurement | 8.1.0 |
| **contextualStrings**            | string\[\]                                    | An array of phrases that should be recognized, even if they are not in the system vocabulary. Only available on Android (SDK 33+) and iOS.                                                                                                                                                                                                                                                              | 7.3.0                        |       |
| **deactivateAudioSessionOnStop** | boolean                                       | Whether or not to deactivate your app's audio session on stop. Only available on iOS.                                                                                                                                                                                                                                                                                                                   | true                         | 7.2.0 |
| **enableFormatting**             | boolean                                       | Whether to add punctuation to speech recognition results. **Note**: On Android, this option does not work reliably as it varies depending on the device and TTS engine. Only available on Android (SDK 33+) and iOS (+16).                                                                                                                                                                              | false                        | 7.4.0 |
| **language**                     | string                                        | The BC-47 language tag for the language to use for speech recognition.                                                                                                                                                                                                                                                                                                                                  | 6.0.0                        |       |
| **silenceThreshold**             | number                                        | The number of milliseconds of silence before the speech recognition ends. **Attention**: This option may not work reliably on all devices and platforms as it depends on the underlying speech recognition service. This is a limitation of the platform and not the plugin itself. Continuous listening by setting an extremely high value will not work. Only available on Android (SDK 33+) and iOS. | 2000                         | 6.0.0 |
| **taskHint**                     | [TaskHint](#taskhint)                         | The type of task for which the speech recognition is being used for. Only available on iOS.                                                                                                                                                                                                                                                                                                             | TaskHint.Unspecified         | 7.5.0 |
| **requireOnDeviceRecognition**   | boolean                                       | Whether to require on-device speech recognition. If true, speech recognition will only use on-device models. If the on-device model is not available, the call will fail with an error. Only available on Android (SDK 33+) and iOS.                                                                                                                                                                    | false                        | 8.1.0 |
| **useSpeechTranscriber**         | boolean                                       | Whether to use the SpeechTranscriber API for on-device speech recognition. This avoids the "Speech data from this app will be sent to Apple" permission dialog and only requires microphone permission. On-device recognition is used implicitly when this option is set to true, so requireOnDeviceRecognition does not need to be set separately. Only available on iOS (26+).                        | false                        | 8.1.0 |

#### StopListeningOptions[¶](#stoplisteningoptions "Permanent link")

| Prop                       | Type    | Description                                                                   | Default | Since |
| -------------------------- | ------- | ----------------------------------------------------------------------------- | ------- | ----- |
| **deactivateAudioSession** | boolean | Whether or not to deactivate your app's audio session. Only available on iOS. | true    | 7.2.0 |

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

| Prop                  | Type                                | Description                                                     | Since |
| --------------------- | ----------------------------------- | --------------------------------------------------------------- | ----- |
| **audioRecording**    | [PermissionState](#permissionstate) | Permission state for recording audio.                           | 7.1.0 |
| **recordAudio**       | [PermissionState](#permissionstate) | Permission state for speech recognition.                        | 6.0.0 |
| **speechRecognition** | [PermissionState](#permissionstate) | Permission state for speech recognition. Only available on iOS. | 7.1.0 |

#### SpeechRecognitionPluginPermission[¶](#speechrecognitionpluginpermission "Permanent link")

| Prop            | Type                                |
| --------------- | ----------------------------------- |
| **permissions** | SpeechRecognitionPermissionType\[\] |

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

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

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

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

#### PartialResultEvent[¶](#partialresultevent "Permanent link")

| Prop       | Type   | Description                                   | Since |
| ---------- | ------ | --------------------------------------------- | ----- |
| **result** | string | The partial result of the speech recognition. | 6.0.0 |

#### ResultEvent[¶](#resultevent "Permanent link")

| Prop       | Type   | Description                                 | Since |
| ---------- | ------ | ------------------------------------------- | ----- |
| **result** | string | The final result of the speech recognition. | 6.0.0 |

#### SoundLevelEvent[¶](#soundlevelevent "Permanent link")

| Prop      | Type   | Description                                                                                                                                                                          | Since |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- |
| **level** | number | The sound level of the audio signal. The value is normalized across platforms to a range of 0-100, where 0 represents minimum detected sound and 100 represents maximum sound level. | 7.5.0 |

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

#### DownloadOnDeviceLanguageCallback[¶](#downloadondevicelanguagecallback "Permanent link")

`(event: [DownloadOnDeviceLanguageCallbackEvent](#downloadondevicelanguagecallbackevent) | null, error: any): void`

#### CallbackId[¶](#callbackid "Permanent link")

`string`

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

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

#### SpeechRecognitionPermissionType[¶](#speechrecognitionpermissiontype "Permanent link")

`'audioRecording' | 'speechRecognition'`

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

#### AudioSessionCategory[¶](#audiosessioncategory "Permanent link")

| Members           | Value               | Description                                                           | Since |
| ----------------- | ------------------- | --------------------------------------------------------------------- | ----- |
| **Record**        | 'RECORD'            | The category for recording audio while also silencing playback audio. | 7.2.0 |
| **PlayAndRecord** | 'PLAY\_AND\_RECORD' | The category for recording (input) and playback (output) of audio.    | 7.2.0 |

#### AudioSessionMode[¶](#audiosessionmode "Permanent link")

| Members            | Value              | Description                                                                   | Since |
| ------------------ | ------------------ | ----------------------------------------------------------------------------- | ----- |
| **Default**        | 'DEFAULT'          | Default mode that doesn't enable additional audio session features.           | 8.1.0 |
| **GameChat**       | 'GAME\_CHAT'       | Mode for chat communication over VoIP or internet, optimized for low latency. | 8.1.0 |
| **Measurement**    | 'MEASUREMENT'      | Mode for high-quality measurement recordings with maximum dynamic range.      | 8.1.0 |
| **SpokenAudio**    | 'SPOKEN\_AUDIO'    | Mode for speech recording and transcription with optimized voice processing.  | 8.1.0 |
| **VideoChat**      | 'VIDEO\_CHAT'      | Mode for two-way video chat communications.                                   | 8.1.0 |
| **VideoRecording** | 'VIDEO\_RECORDING' | Mode for recording video content with high-quality audio.                     | 8.1.0 |
| **VoiceChat**      | 'VOICE\_CHAT'      | Mode for voice chat communications.                                           | 8.1.0 |

#### TaskHint[¶](#taskhint "Permanent link")

| Members          | Value          | Since |
| ---------------- | -------------- | ----- |
| **Confirmation** | 'CONFIRMATION' | 7.5.0 |
| **Dictation**    | 'DICTATION'    | 7.5.0 |
| **Search**       | 'SEARCH'       | 7.5.0 |
| **Unspecified**  | 'UNSPECIFIED'  | 7.5.0 |

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

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

## Breaking Changes[¶](#breaking-changes "Permanent link")

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

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

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

May 17, 2026 

 Back to top 