Skip to main content

live_translate

Translate a voice interaction in real-time.

NameTypeDefaultDescription
live_translateRequiredobject-An object that accepts the live_translate parameters.

live_translate Parameters

NameTypeDefaultDescription
action Requiredstring | object-The action to be performed.
An object that contains one of the live_translate actions
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'