# SpeechRecognitionApi (@salmonui/inputs/speech-to-text)

> The SpeechRecognitionApi interface of @salmonui/inputs/speech-to-text.

Canonical: https://salmonui.dev/docs/reference/inputs/speech-to-text/SpeechRecognitionApi

```ts
import type { SpeechRecognitionApi } from '@salmonui/inputs/speech-to-text';
```

Entry index: https://salmonui.dev/docs/reference/inputs/speech-to-text (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/inputs/speech-to-text.md).

## Reference

Kind: interface

```ts
interface SpeechRecognitionApi {
    readonly state: SpeechRecognitionState;
    readonly transcript: string;
    readonly supported: boolean;
    readonly start: () => void;
    readonly stop: () => void;
    readonly abort: () => void;
}
```

Members (6):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `state` | `readonly state: SpeechRecognitionState;` |  | `'idle'`, `'listening'` or `'stopped'`. |
| `transcript` | `readonly transcript: string;` |  | Text of the current session: final results, then interim ones. |
| `supported` | `readonly supported: boolean;` |  | False on the server, during hydration and in browsers without the Web Speech API; true with a `recognizer`. |
| `start` | `readonly start: () => void;` |  | Starts a new session with an empty transcript. Without a recognizer it calls `onError({ code: 'unsupported' })`. |
| `stop` | `readonly stop: () => void;` |  | Stops listening; the last results still arrive, then the session ends. |
| `abort` | `readonly abort: () => void;` |  | Ends the session without further results. |
