Skip to content
Browse docs and components

Voice Picker

voice-picker

Choose a text-to-speech voice by ear: grouped voice cards in one radio group, each with a play button for a sample beside the radio, and a waveform on the one that is playing.

Responsive

Install

$npxshadcnadd@forme/voice-picker

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

VoicePicker

Choosing a text-to-speech voice is choosing by ear, so every option can be heard before it is picked. It is one radio group — arrow keys move through every voice, across groups — and each card carries a play button beside the radio rather than inside it, so the two never fight over a click.

PropTypeDefaultDescription
voices*readonly Voice[]—
valuestring | null—
defaultValuestring—
onValueChange(id: string) => void—
onPreview(voice: Voice) => void—Called to play or stop a sample. Without it there is no preview button. Synthesise or fetch the sample here; the picker only shows which is playing.
previewingstring | nullnullThe id of the voice whose sample is playing, if any.
labelstring"Voice"
classNamestring—