Voice memoPro
Record a memo, then get the transcript, a summary and action items to check off.
On this page
ProRecord with simulated input, stop, and the transcript, summary and action items stream in.
Installation
Usage
import { VoiceMemo } from "@/components/ui/chatcn/pro/voice-memo"
<VoiceMemo
onRecordingComplete={({ blob }) => transcribe(blob)}
transcript={segments}
summary={summary}
actions={actions}
onActionChange={(id, done) => toggle(id, done)}
status={status}
/>The memo records itself: the microphone with input="mic", or a speech-like level with input="simulated" for demos and tests. On stop you get the audio and its levels; send it for transcription and stream the result back through transcript, then summary and actions. Timed transcript sentences link to the waveform: point at one and its stretch of the recording lights up.
Examples
States
ProReady, transcribing, done with an item checked and failed.
Props
| Prop | Type | Notes |
|---|---|---|
input | "mic" | "simulated" | Default mic |
onRecordingComplete | ({ durationMs, peaks, blob? }) => void | Send the audio here |
transcript | { id, text, start, end }[] | string | Streams in |
summary | string | Streams in after the transcript |
actions, onActionChange | { id, text, done?, detail? }[] | Checkable items |
status | "transcribing" | "summarizing" | "done" | "error" | Inferred when left out |
recording | { durationMs, peaks } | Show a finished memo |
maxDuration | number | Seconds. Default 300 |
onDiscard, onReset, onRetry | Discard, Record another and Retry |
Keyboard
| Key | Action |
|---|---|
| Enter or Space | Record, pause, resume and stop from the buttons |
| Space | Check or uncheck an action item |
Accessibility
- The recording timer is a timer role with the elapsed time in words; recording and paused are announced politely.
- Microphone errors say what blocked it and how to allow it.
- Action items are checkboxes named by their text.
Motion
The live waveform scrolls while recording and rests flat when paused. On stop the bars settle to the finished recording in 280 ms. Checks swap in over 150 ms. Reduced motion keeps color changes only.