liveTranscribe

View as MarkdownOpen in Claude

Start or stop live transcription on the call. Unlike transcribe() which provides a post-call result, live transcription delivers text in real-time.

See also liveTranslate() for real-time translation.

Parameters

action
Record<string, unknown>Required

Action configuration for the live transcription.

action.action
stringRequired

The action to perform.

  • "start" — begin live transcription
  • "stop" — end live transcription
action.language
string

Transcription language code (e.g., "en-US").

action.status_url
string

URL to receive transcription results via webhook.

Returns

Promise<Record<string, unknown>> — Server response confirming the operation.

Example

import { RelayClient } from '@signalwire/sdk';
const client = new RelayClient({
project: process.env.SIGNALWIRE_PROJECT_ID!,
token: process.env.SIGNALWIRE_API_TOKEN!,
contexts: ['default']
});
client.onCall(async (call) => {
await call.answer();
// Start live transcription
const result = await call.liveTranscribe({
action: 'start',
language: 'en-US',
status_url: 'https://example.com/transcription-results',
});
console.log('Live transcription started:', result);
// Let the call proceed...
await call.waitForEnded();
});
await client.run();