Skip to main content

live_translate

Translate a voice interaction in real-time.

Parameters

NameTypeDescription
action Requiredstring | objectThe action to be performed.
Possible Values: [stop, start, summarize, inject ]

Example

In the below example, the SWML script answers an incoming call and then starts recording the call. The script then starts a live translation session by using the start action. The script will translate the conversation from English to Spanish. After the translation session has started, the script connects the call to a destination number.

sections:
main:
- answer: {}
- record_call:
format: wav
stereo: 'true'
- live_translate:
action:
start:
webhook: 'https://example.com/webhook'
to_voice: elevenlabs.rachel
to_lang: es
direction:
- local-caller
- remote-caller
from_lang: en-US
from_voice: elevenlabs.rachel
live_events: true
ai_summary: true
- connect:
from: '+1XXXXXXXXXX'
to: '+1XXXXXXXXXX'