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

from signalwire.relay import RelayClient
client = RelayClient(
project="your-project-id",
token="your-api-token",
contexts=["default"],
)
@client.on_call
async def handle_call(call):
await call.answer()
# Start live transcription
result = await call.live_transcribe({
"action": "start",
"language": "en-US",
"status_url": "https://example.com/transcription-results",
})
print(f"Live transcription started: {result}")
# Let the call proceed...
await call.wait_for_ended()
client.run()