Skip to content
Sign in
VoiceVoice memoMenu

Voice memoPro

Record a memo, then get the transcript, a summary and action items to check off.

ProRecord with simulated input, stop, and the transcript, summary and action items stream in.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/voice-memo

Usage

tsx
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

PropTypeNotes
input"mic" | "simulated"Default mic
onRecordingComplete({ durationMs, peaks, blob? }) => voidSend the audio here
transcript{ id, text, start, end }[] | stringStreams in
summarystringStreams 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
maxDurationnumberSeconds. Default 300
onDiscard, onReset, onRetryDiscard, Record another and Retry

Keyboard

KeyAction
Enter or SpaceRecord, pause, resume and stop from the buttons
SpaceCheck 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.