Call transcript

A call's transcript as a speaker-labeled exchange. One-shot for finished calls; give it a poll interval and it follows a live call as utterances arrive.

Installation

npx shadcn@latest add @handset/call-transcript

Usage

import { CallTranscriptView } from "@/components/handset/call-transcript";

// Finished call — fetch once:
<CallTranscriptView callId={call.id} />

// Live call — follow along (pairs with <ClickToCallButton transcribe />):
<CallTranscriptView callId={activeCall.id} pollMs={2000} />

Transcripts exist when the call was placed with transcribe: true. Calls without one render a quiet "No transcript for this call" — the component handles the 404 for you. Agent lines are tinted with your primary color; customer lines stay neutral.

Props

Props
PropTypeDefaultDescription
callIdstring | nullWhich call's transcript to show.
pollMsnumber00 = fetch once. ~2000 to follow a live call.
classNamestringMerged onto the list.