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

> The SpeechRecognizer interface of @salmonui/inputs/speech-to-text: The subset of the Web Speech SpeechRecognition interface the hook uses. A cloud recognizer implements it; one instance per session.

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

```ts
import type { SpeechRecognizer } 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 SpeechRecognizer {
    lang: string;
    continuous: boolean;
    interimResults: boolean;
    start(): void;
    stop(): void;
    abort(): void;
    onstart: ((event: unknown) => void) | null;
    onresult: ((event: SpeechRecognizerResultEvent) => void) | null;
    onerror: ((event: {
        readonly error: string;
        readonly message?: string;
    }) => void) | null;
    onend: ((event: unknown) => void) | null;
}
```

The subset of the Web Speech `SpeechRecognition` interface the hook uses. A cloud recognizer implements it; one instance per session.

Members (10):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `lang` | `lang: string;` |  |  |
| `continuous` | `continuous: boolean;` |  |  |
| `interimResults` | `interimResults: boolean;` |  |  |
| `start` | `start(): void;` |  |  |
| `stop` | `stop(): void;` |  |  |
| `abort` | `abort(): void;` |  |  |
| `onstart` | `onstart: ((event: unknown) => void) \| null;` |  |  |
| `onresult` | `onresult: ((event: SpeechRecognizerResultEvent) => void) \| null;` |  |  |
| `onerror` | `onerror: ((event: {     readonly error: string;     readonly message?: string; }) => void) \| null;` |  |  |
| `onend` | `onend: ((event: unknown) => void) \| null;` |  |  |
