Reference
Remy Reference/interface/VoiceTranscriptEvent
?

VoiceTranscriptEvent

Type
One live-caption update for a single utterance, from either side of the call.

One update to a live caption, delivered on the transcript event for both the user and the agent. Because text is always the full segment so far, render by upserting on segmentId rather than appending, and reserve a fixed caption area so arriving text does not shift the layout. User-side captions are recognition output: show them, but never feed them back into app logic as input.

VoiceTranscriptEvent.ts
interface VoiceTranscriptEvent {
  role: 'user' | 'agent'
  segmentId: string
  text: string
  final: boolean
}
Fields
role
'user' | 'agent'
Whose speech this is.
segmentId
string
Stable id for one utterance. Updates with the same id replace, not append.
text
string
The utterance so far, always the full text, never a delta.
final
boolean
True once this segment will not change again.
Upsert a caption
session.on('transcript', ({ role, segmentId, text, final }: VoiceTranscriptEvent) =>
  upsertCaption(segmentId, role, text, final),
);