Search nx-ui
Jump to any foundation, component, block or example.
Speech Input
Speech recognition with clear unsupported and permission states.
$
Registry itembunx shadcn@latest add @nx-ui/ai-speech-inputInteractive example
Speech recognition with clear unsupported and permission states.
Speech button presses: 0
Recorded MIME: none
Activate the microphone to transcribe. No permission is requested until activation.
API reference
Exported parts and their props, extracted from the component source.
| Prop | Type | Default | Description |
|---|---|---|---|
onTranscriptionChange | (text: string) => void | — | — |
onAudioRecorded | (audioBlob: Blob) => Promise<string> | — | Callback for when audio is recorded using MediaRecorder fallback. This is called in browsers that don't support the Web Speech API (Firefox, Safari). The callback receives an audio Blob that should be sent to a transcription service. Return the transcribed text, which will be passed to onTranscriptionChange. |
lang | string | "en-US" | — |
…extends ComponentProps<typeof Button>