Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.burki.dev/llms.txt

Use this file to discover all available pages before exploring further.

Live Transcript Streaming Guide

Live transcript streaming lets your application react while a call is still active. Use this guide for product patterns and integration architecture. For exact message schemas, auth modes, and close codes, use the Live Transcript WebSocket API Reference.

When to Use Live Transcripts

  • Build supervisor dashboards that show caller and assistant speech in real time.
  • Trigger compliance or escalation alerts while a call is happening.
  • Power live captions and accessibility views.
  • Feed real-time QA, coaching, or sentiment workflows.
  • Store timestamped segments for post-call analytics.

Connection Summary

wss://api.burki.dev/live-transcript/{call_sid}?token={api_key}
The call_sid is the Burki call SID for the call you want to monitor. The authenticated user or API key must belong to the same organization as the call’s assistant. Browser clients should use the token query parameter or WebSocket subprotocol. Server-side clients can also send Authorization: Bearer ... headers.
  1. Start from a call record returned by the Calls API or webhook.
  2. Open the WebSocket with call_sid and an API key or JWT.
  3. Wait for connection_established.
  4. Render existing transcript messages sent on connection.
  5. Append live transcript messages as they arrive.
  6. Listen for call_status and close the UI when the call completes.
  7. Reconnect with backoff for transient network interruptions.

Minimal Browser Example

const callSid = "CA123abc";
const token = "burki_api_key_or_jwt";
const ws = new WebSocket(
  `wss://api.burki.dev/live-transcript/${callSid}?token=${encodeURIComponent(token)}`
);

ws.onmessage = (event) => {
  const message = JSON.parse(event.data);

  if (message.type === "transcript") {
    renderTranscriptSegment(message.data);
  }

  if (message.type === "call_status" && message.status === "completed") {
    ws.close();
  }
};

ws.onclose = (event) => {
  if (event.code !== 1000) {
    scheduleReconnect();
  }
};

Minimal Server-Side Example

import WebSocket from "ws";

const ws = new WebSocket(`wss://api.burki.dev/live-transcript/${callSid}`, {
  headers: {
    Authorization: `Bearer ${process.env.BURKI_API_KEY}`,
  },
});

ws.on("message", (raw) => {
  const message = JSON.parse(raw.toString());
  console.log(message);
});

Production Notes

  • Do not expose long-lived API keys in browser code. Use short-lived tokens or proxy connection setup through your backend when possible.
  • Treat transcript content as sensitive customer data.
  • Use ping/pong or reconnect timers for long-running monitoring dashboards.
  • Store the last received timestamp or segment ID in your UI state so reconnects can avoid duplicate display.
  • Prefer REST transcript export endpoints for completed calls when real-time updates are not required.

API Reference

Use Live Transcript WebSocket API Reference for:
  • Complete server-to-client message formats.
  • Client-to-server ping and status request messages.
  • Close codes and error behavior.
  • Browser vs server-side auth method details.