RELAYCall

live_transcribe

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 live_translate() for real-time translation.

Parameters

action
dictRequired

Action configuration for the live transcription.

action.action
strRequired

The action to perform.

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

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

action.status_url
str

URL to receive transcription results via webhook.

Returns

dict — Server response confirming the operation.

Example

1from signalwire.relay import RelayClient
2
3client = RelayClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7 contexts=["default"],
8)
9
10@client.on_call
11async def handle_call(call):
12 await call.answer()
13
14 # Start live transcription
15 result = await call.live_transcribe({
16 "action": "start",
17 "language": "en-US",
18 "status_url": "https://example.com/transcription-results",
19 })
20 print(f"Live transcription started: {result}")
21
22 # Let the call proceed...
23 await call.wait_for_ended()
24
25client.run()