Voice picker

A React component in Beamline's Voice & audio category.

Choose a text-to-speech voice from a searchable list (name, accent, tone, use) and hear it first: each voice has its own orb, previews play one at a time and the orb speaks while its sample plays.

Use it for

  • Choosing a voice for an agent, a narration or read-aloud in settings or a builder.

Not for

Anatomy

  • label
  • trigger (orb, name, facets; in a short field the facets give way before the name)
  • preview button for the chosen voice
  • list: search field, rows (orb, name, facets, check), footer preview for the highlighted voice

Variants

  • size: sm, md, lg

States

  • empty (placeholder)
  • chosen
  • open
  • searching (matches ranked, match emphasised)
  • no match
  • previewing (orb speaks; play turns into stop in place)
  • preview loading
  • preview failed (the words grow in under the field)
  • no preview for a voice
  • disabled

Keyboard

  • Trigger: Enter, Space or ↓ opens
  • In the list: type to search, ↑ ↓ move, Enter chooses (focus returns to the trigger), Escape closes
  • → at the end of the search previews the highlighted voice; Tab reaches the footer Preview button
  • The chosen voice's Preview is a toggle button (aria-pressed)

Motion

The highlight glides between rows (the shared listbox plate). Orbs hold still at rest; the previewing voice's orb widens its ring with the sample's level and stops when it ends. Play and stop share one place on the preview buttons (in over --pui-motion-in, out over --pui-motion-out). A failed sample's words grow in under the field. Under reduced motion the orbs hold still and the glyphs fade.

Props

PropTypeDefaultDescription
voices (required)VoiceOption[]—A provider's voice list as is: { voiceId, name?, labels?, previewUrl?, description? }.
value / defaultValue / onValueChangestring—value: Controlled id of the chosen voice; omit to use defaultValue. defaultValue: Initial id of the chosen voice when uncontrolled. Defaults to no selected voice. onValueChange: Reports id of the chosen voice after an edit; no callback by default.
open / defaultOpen / onOpenChangeboolean—open: Controlled open state; omit to use defaultOpen. defaultOpen: Initial open state when uncontrolled. Defaults to false. onOpenChange: Reports open state after a change; no callback by default.
labelReactNode"Voice"Visible label or accessible name for the control. Defaults to "Voice".
hideLabel / placeholder / size / disabledboolean / string / "sm" | "md" | "lg" / boolean—hideLabel: Hides the label; defaults to false. Deprecated: Use showLabel={false} instead. placeholder: Text shown before a value is entered or selected. Defaults to "Choose a voice". size: Control size within the supported size steps. Defaults to "md". disabled: Prevents interaction with the control. Defaults to false.
previewbooleantrueOffer previews (voices need a previewUrl). Default true.
facetsstring[]["accent", "tone", "use"]Which labels to show, in order. Default accent, tone, use.
classNamesVoicePickerClassNames—Classes for the named visual parts; no part overrides by default.
style / refCSSProperties / Ref—style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the button or trigger; no ref by default.
showLabelbooleantrueShows the label visually while keeping its accessible name; defaults to true. Takes precedence over hideLabel.
valuestring—Controlled id of the chosen voice; omit to use defaultValue.
defaultValuestring—Initial id of the chosen voice when uncontrolled. Defaults to no selected voice.
onValueChange((voiceId: string) => void)—Reports id of the chosen voice after an edit; no callback by default.
openboolean—Controlled open state; omit to use defaultOpen.
defaultOpenboolean—Initial open state when uncontrolled. Defaults to false.
onOpenChange((open: boolean) => void)—Reports open state after a change; no callback by default.
hideLabelboolean—Hides the label; defaults to false. Deprecated: Use showLabel={false} instead.
placeholderstring—Text shown before a value is entered or selected. Defaults to "Choose a voice".
sizeFieldSize—Control size within the supported size steps. Defaults to "md".
disabledboolean—Prevents interaction with the control. Defaults to false.
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
refRef<HTMLButtonElement>—Receives the button or trigger; no ref by default.
VoiceOrb.voice (required)VoiceOption—On VoiceOrb: Voice record displayed by this option. Required.
VoiceOrb.speakingboolean—On VoiceOrb: Animates the voice marker as speaking. Defaults to false.

Built from

  • orb
  • button
  • tooltip
  • popover

Dependencies

lucide-react

Import

import { VoiceOrb, VoicePicker } from "@beamline/voice-picker";

Get it

Voice picker is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Voice & audio

  • Recorded answer: A spoken answer against a time limit: record (the microphone asked for first, a blocked one said with what to do), the running time against the limit…
  • Orb: The agent's presence: a thin ring of light around a lens in the brand's hue that holds still at rest, sends an arc round while thinking and widens with…
  • Call grid: The people on a video call, laid out for the room they are given: tiles as large as the space allows at the camera's shape, or the person talking (or a…
  • Bar visualizer: A row of bars that says what a voice agent is doing: a sweep while connecting, the person's voice while listening, a slow breath while thinking, the…
  • Matrix: A dot-matrix display: animated frame sets (loading, pulse, wave, syncing), text and digits in a 5×7 font, or a VU meter of levels or a live source. One…
  • Transcript viewer: A recording and its words together: the spoken word lights up as it plays and the transcript follows it, any word or paragraph time plays from there…
  • Waveform: The shape of a recording: one bar per slice of loudness, fitted to any width, with the played part in the accent, unmeasured slices hatched and a loading…
  • Live waveform: Loudness drawn as it happens: a scrolling history of the microphone (or any live source) or its spectrum, a calm processing state while words are…
  • Conversation bar: The control bar of a voice call with an agent: one button to call and hang up, the agent's state as bars, a call timer, mute, and typing when talking is…
  • Audio player: One audio element and its controls: play with a loading state, a scrub bar with time, skip, speed and a playlist whose rows play into the same player…
  • Voice button: The control that starts and stops talking: click to toggle or hold to talk (pointer, Space, Enter or a global shortcut), with a live level while…
  • Scrub bar: A seekable timeline for audio or video: elapsed and total time, what has loaded, chapter marks, a time preview under the pointer, and the full keyboard…
  • Speech input: A text field you can speak into: the mic dictates through any speech-to-text provider, the phrase being heard shows apart from the finished words, and…
  • Microphone selector: Choose the microphone, test it with a live level and mute it, with every permission and device state spelled out: not yet allowed, blocked (and how to…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.