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

1import { RelayClient } from '@signalwire/sdk';
2
3const client = new RelayClient({
4 project: process.env.SIGNALWIRE_PROJECT_ID!,
5 token: process.env.SIGNALWIRE_TOKEN!,
6 contexts: ['default']
7});
8
9client.onCall(async (call) => {
10 await call.answer();
11
12 // Start live transcription
13 const result = await call.liveTranscribe({
14 action: 'start',
15 language: 'en-US',
16 status_url: 'https://example.com/transcription-results',
17 });
18 console.log('Live transcription started:', result);
19
20 // Let the call proceed...
21 await call.waitForEnded();
22});
23
24await client.run();