# Voice Control

Round controls for voice and call surfaces, with a live level meter while listening.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/voice-control
```

## Usage

```tsx
import { VoiceBar } from '@/components/fetaui/voice-control'

export function Example() {
  return <VoiceBar onEnd={() => {}} />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| control | mic, listening, muted, captions, captions-on, stop, end, more | mic |
| label | string | per control |
| levels | number[] |  |
| disabled | boolean | false |
| animated | boolean | true |
| VoiceBar state | idle, listening, muted |  |
| VoiceBar defaultState | idle, listening, muted | idle |
| VoiceBar onStateChange | (state) => void |  |
| VoiceBar meta | string | agent, then the call time |
| VoiceBar agent | string | Assistant |
| VoiceBar onEnd | () => void |  |
| VoiceBar onMore | () => void |  |

## When to use

- In voice assistants, calls and dictation.
- VoiceBar for the full surface: status, timer, wave and controls.

## When not to use

- For everyday actions: use Icon Button.

## Accessibility

- Native buttons with a label for each control.
- Muted and captions use aria-pressed.
- The bar announces its status.

## Motion

- Listening pulses a soft halo in a 1200 ms loop.
- Idle level bars loop while listening, and stop with animated off or reduced motion.
- Pass levels and the bars hold those heights in place of the loop.
- Bars stop when the control is disabled and pause offscreen.
- Mute stops the wave at once.
- With reduced motion, the halo holds still and the bars keep moving.
- Swift uses an SF Symbol for the level meter.
