Skip to content
Twentyfirst UIHalo

Voice Note

AI · VoiceNote, VoiceLog

View as Markdown

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
  1. YouWhat still needs me today?
  2. AtlasTwo approvals: the Northwind reply and a refund of €10.
  3. YouApprove the reply, I'll look at the refund later.
  4. AtlasSent. The refund stays in your inbox.

Props

VoiceNote

PropTypeNotes
src?stringThe recording (any URL the browser can play).
duration?numberLength in seconds (default: read from the file).
transcript?ReactNodeThe 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?booleanDrawn as the user's own (on the primary colour).
label?string
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

VoiceLog

PropTypeNotes
title?stringDefault "Voice conversation".
duration?stringLength as shown ("4:12").
time?string
turnsVoiceTurn[]Required
audio?stringThe recording, if it was kept.
audioDuration?number
id?string
open?boolean
defaultOpen?boolean
onOpenChange?(open: boolean) => void
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.