Search nx-ui

Jump to any foundation, component, block or example.

Speech Input

Speech recognition with clear unsupported and permission states.

$bunx shadcn@latest add @nx-ui/ai-speech-input
Registry item
Installs withbuttonspinnerutils

Interactive 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.

PropTypeDefaultDescription
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.
langstring"en-US"—

…extends ComponentProps<typeof Button>