API reference: @salmonui/inputs/speech-to-text
SpeechRecognitionApiinterface
import type { SpeechRecognitionApi } from '@salmonui/inputs/speech-to-text';interface SpeechRecognitionApi {
readonly state: SpeechRecognitionState;
readonly transcript: string;
readonly supported: boolean;
readonly start: () => void;
readonly stop: () => void;
readonly abort: () => void;
}
| Name | Signature | Description |
|---|---|---|
state | readonly state: SpeechRecognitionState; |
|
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 |
start | readonly start: () => void; | Starts a new session with an empty transcript. Without a recognizer it calls |
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. |