Push to Talk
Hold to speak with pointer or the Space key. The ring grows with input level so users know they're heard.
Hold the button or Space
Installation
pnpm dlx shadcn@latest add @jds/push-to-talk
Usage
import { PushToTalk } from "@/components/voice/push-to-talk"
<PushToTalk onPressStart={mic.start} onPressEnd={mic.stop} level={mic.level} />API Reference
PushToTalk
| Prop | Type | Default |
|---|---|---|
onPressStart | () => void | – |
onPressEndAlso fires on window blur. | () => void | – |
levelInput loudness 0 to 1. | number | 0 |
hotkeySpace triggers, except while typing in a field. | boolean | true |