Starts and stops native speech capture, with final text, optional interim results, and application transcription of recorded audio.
Preview
Speech capture requires application code.
In action
Add text by speaking
Final speech appears here. Nothing is sent to a conversation.
Activate speech input to use this browser’s recognition when available. Final text stays in this example. Applications can provide onAudioRecorded to transcribe a recording in browsers that need a fallback.
When to use
Use it for
Capture speech only after the user activates the button. Stop processes the recording; Cancel discards pending capture or transcription.
Native speech recognition is feature-detected. Supply onAudioRecorded for browsers that need a MediaRecorder transcription fallback.
The fallback negotiates an available media type and passes actual audio bytes plus an AbortSignal to the application.
Use mode=recording and deviceId for a specific input. Recognition mode follows the browser's input choice.
maxDuration defaults to 120 seconds; configuration changes and unmount cancel owned capture resources.
Provider credentials and transcription requests belong to the application. CSS-only markup does not record audio.
Avoid
Claiming browser speech recognition always works offline.
Automatically sending transcribed text to a conversation without the application's send action.
Install
React package
npm install @noorddev/vlak-react
Load the stylesheet once at your app root, then import the components you use.
import "@noorddev/vlak-react/css";
import { SpeechInput } from "@noorddev/vlak-react";
Per-component imports are available at @noorddev/vlak-react/components/speech-input.
Copy the source
npx @noorddev/vlak-cli add speech-input
Adds the component and its dependencies to components/vlak/. Follow the StyleX setup to compile the source in your application.