Voice Note
AI · VoiceNote, VoiceLog
Voice in a text thread.
VoiceNote: a recorded voice message: play and pause, seek on the bars (a slider for keyboards and screen readers), the length, and the transcript behind "Show transcript". src, duration (seconds; read from the file if left out), transcript, transcriptOpen / onTranscriptOpenChange, peaks (loudness 0 to 1 for the bars), mine (the user's own, on the primary colour). ChatMessage voice uses it.
VoiceLog: after a voice conversation (VoiceMode), one folded record in the thread: title (default "Voice conversation"), duration, time, turns ({who, name, text}), audio (the recording, if it was kept), open / defaultOpen / onOpenChange.
0:42
0:08
- YouWhat still needs me today?
- AtlasTwo approvals: the Northwind reply and a refund of €10.
- YouApprove the reply, I'll look at the refund later.
- AtlasSent. The refund stays in your inbox.
Props
VoiceNote
| Prop | Type | Notes |
|---|---|---|
src? | string | The recording (any URL the browser can play). |
duration? | number | Length in seconds (default: read from the file). |
transcript? | ReactNode | The words, behind "Show transcript". |
transcriptOpen? | boolean | |
onTranscriptOpenChange? | (open: boolean) => void | |
peaks? | number[] | Loudness per moment, 0 to 1, for the bars (default: a steady pattern). |
mine? | boolean | Drawn as the user's own (on the primary colour). |
label? | string | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |
VoiceLog
| Prop | Type | Notes |
|---|---|---|
title? | string | Default "Voice conversation". |
duration? | string | Length as shown ("4:12"). |
time? | string | |
turns | VoiceTurn[] | Required |
audio? | string | The recording, if it was kept. |
audioDuration? | number | |
id? | string | |
open? | boolean | |
defaultOpen? | boolean | |
onOpenChange? | (open: boolean) => void | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |