# capacitor-plugin-speech-recognition

> Capacitor plugin for speech recognition.

Latest version **0.1.0** (published 2022-07-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install capacitor-plugin-speech-recognition
pnpm add capacitor-plugin-speech-recognition
yarn add capacitor-plugin-speech-recognition
bun add capacitor-plugin-speech-recognition
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2022-07-07 |
| First published | 2022-04-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 113.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | asad-96 |
| Maintainers | asad-96 |
| Keywords | capacitor, plugin, native |

## Links

- npm: https://www.npmjs.com/package/capacitor-plugin-speech-recognition
- Repository: https://github.com/asad-96/capacitor-plugin-speech-recognition.git
- Homepage: https://github.com/asad-96/capacitor-plugin-speech-recognition.git#readme
- Issues: https://github.com/asad-96/capacitor-plugin-speech-recognition.git/issues
- npm.io page: https://npm.io/package/capacitor-plugin-speech-recognition

## Recent versions

- 0.1.0 (latest) — 2022-07-07
- 0.0.9 — 2022-07-06
- 0.0.8 — 2022-07-03
- 0.0.7 — 2022-06-22
- 0.0.6 — 2022-06-20
- 0.0.5 — 2022-04-29
- 0.0.3 — 2022-04-29
- 0.0.2 — 2022-04-27
- 0.0.1 — 2022-04-19

## README

# capacitor-plugin-speech-recognition

Capacitor plugin for speech recognition.

## Install

```bash
npm install capacitor-plugin-speech-recognition
npx cap sync
```

iOS Platform: No further action required.

Android Platform: Register the plugin in your main activity:

```java
import com.getcapacitor.community.speechrecognition.SpeechRecognition;

public class MainActivity extends BridgeActivity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initializes the Bridge
    registerPlugin(SpeechRecognitionPlugin.class);
  }
}

```

## Configuration

No configuration required for this plugin

## Supported methods

| Name                  | Android | iOS | Web |
| :-------------------- | :------ | :-- | :-- |
| available             | ✅      | ✅  | ✅  |
| start                 | ✅      | ✅  | ✅  |
| stop                  | ✅      | ✅  | ✅  |
| getSupportedLanguages | ✅      | ✅  | ✅  |
| hasPermission         | ✅      | ✅  | ✅  |
| requestPermission     | ✅      | ✅  | ✅  |

## API

<docgen-index>

* [`available()`](#available)
* [`start(...)`](#start)
* [`stop()`](#stop)
* [`getSupportedLanguages()`](#getsupportedlanguages)
* [`hasPermission()`](#haspermission)
* [`requestPermission()`](#requestpermission)
* [`addListener('partialResults', ...)`](#addlistenerpartialresults)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### available()

```typescript
available() => Promise<{ available: boolean; }>
```

**Returns:** <code>Promise&lt;{ available: boolean; }&gt;</code>

--------------------


### start(...)

```typescript
start(options?: UtteranceOptions | undefined) => Promise<{ matches: string[]; }>
```

| Param         | Type                                                          |
| ------------- | ------------------------------------------------------------- |
| **`options`** | <code><a href="#utteranceoptions">UtteranceOptions</a></code> |

**Returns:** <code>Promise&lt;{ matches: string[]; }&gt;</code>

--------------------


### stop()

```typescript
stop() => Promise<void>
```

--------------------


### getSupportedLanguages()

```typescript
getSupportedLanguages() => Promise<{ languages: any[]; }>
```

**Returns:** <code>Promise&lt;{ languages: any[]; }&gt;</code>

--------------------


### hasPermission()

```typescript
hasPermission() => Promise<{ permission: boolean; }>
```

**Returns:** <code>Promise&lt;{ permission: boolean; }&gt;</code>

--------------------


### requestPermission()

```typescript
requestPermission() => Promise<void>
```

--------------------


### addListener('partialResults', ...)

```typescript
addListener(eventName: 'partialResults', listenerFunc: (data: { matches: string[]; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
```

Called when partialResults set to true and result received

Provides partial result.

| Param              | Type                                                   |
| ------------------ | ------------------------------------------------------ |
| **`eventName`**    | <code>'partialResults'</code>                          |
| **`listenerFunc`** | <code>(data: { matches: string[]; }) =&gt; void</code> |

**Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt; & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>

**Since:** 2.0.2

--------------------


### Interfaces


#### UtteranceOptions

| Prop                 | Type                 |
| -------------------- | -------------------- |
| **`language`**       | <code>string</code>  |
| **`maxResults`**     | <code>number</code>  |
| **`prompt`**         | <code>string</code>  |
| **`popup`**          | <code>boolean</code> |
| **`partialResults`** | <code>boolean</code> |


#### PluginListenerHandle

| Prop         | Type                                      |
| ------------ | ----------------------------------------- |
| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |

</docgen-api>

---
_Source: https://npm.io/package/capacitor-plugin-speech-recognition · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
