Media
SpeechInput
Microphone button that captures speech using Web Speech API or MediaRecorder with transcription callbacks.
Tap the mic to capture speech or fall back to recorded audio upload.
Transcribed text appears here while you speak.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| onTranscriptionChange | (text: string) => void | - | Callback for transcribed text |
| onAudioRecorded | (audioBlob: Blob) => Promise<string> | - | Callback for recorded audio blob |
| lang | string | "en-US" | Language code for speech recognition |
| className | string | - | Additional CSS classes |
Import
import { SpeechInput } from '@blastx/ui-ai';