Voice sheet (Pro)
ProIncluded in $99Voice mode as a sheet over the chat: compact with the chat readable above it, or full with the big orb, live captions and controls.
On this page
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { VoiceSheet } from "@/components/ui/chatcn/pro/voice-sheet"
<VoiceSheet
open={voiceOpen}
onOpenChange={setVoiceOpen}
state={state} // "listening" | "thinking" | "speaking" | …
segments={segments} // TranscriptSegment[], both sides
elapsed={seconds}
muted={muted}
onMutedChange={setMuted}
onInterrupt={interrupt}
onEnd={hangUp}
inputLevel={() => mic.level}
outputLevel={() => speaker.level}
/>Compact, the sheet is a bar on the lower third: a small orb, the state and time, mute, interrupt and end, and two lines of live captions; the chat above stays undimmed and usable, so people can read and scroll while they talk. Drag it up, or tap the grabber, and the same orb moves to the middle and grows, the captions get five lines at a larger size and the controls get bigger. Flicking it away ends the call, the same as End. Interrupt is enabled only while the assistant speaks. Built on the free voice-orb (pass level getters for 60 fps without re-renders, or simulate for demos) and Pro live-captions.
Examples
States
Props
| Prop | Type | Notes |
|---|---|---|
open, onOpenChange | boolean | Controlled |
state | VoiceOrbState | Said in words next to the orb |
segments | TranscriptSegment[] | What has been said, both sides |
elapsed | number | Seconds since the call started |
muted, onMutedChange | boolean | The mute toggle |
onInterrupt, onEnd | () => void | Interrupt shows when given |
inputLevel, outputLevel, simulate | Passed to the orb | |
defaultExpanded | boolean | Start full instead of compact |
labels | Partial<VoiceSheetLabels> | Every string, for translation |
Keyboard
| Key | Action |
|---|---|
| Arrow up, down on the grabber | Full or compact; down from compact ends |
| Escape | End the call |
Accessibility
- A non modal dialog named Voice: the chat behind stays reachable.
- The state and time are a status message; captions announce finished lines once.
- Mute is a toggle button that reports whether it is pressed.
Motion
The sheet moves on a critically damped spring. The orb moves and scales between compact and full with transform over 500 ms. Under reduced motion it changes in place and the orb stops moving.