live_translate
live_translate
Start live translation of the call. The translation will be sent to the specified webhook URL. The translate calls guide walks through a first call, which language each party speaks, the webhook events, and AI summaries.
Properties
live_translate
An object that accepts the following properties.
live_translate.action
The action to perform. See actions below. Also accepts a SWML variable reference that resolves to one of the supported actions.
Actions
The action property controls the translation session. Use start to begin translating with configuration options, stop to end an active session, summarize to request an on-demand AI summary mid-session, or inject to insert a translated message into the conversation.
start.direction and its items, start.speech_engine, start.filter_from, start.filter_to, and inject.direction also accept a SWML variable reference. The value it resolves to must be a value the property accepts: a listed value, or for the filters, a preset or a prompt: custom filter.
start
stop
summarize
inject
action.start
Start a live translation session.
start.webhook
The URL to receive translation events via HTTP POST.
When live_events is enabled, partial results are sent as they occur.
When ai_summary is enabled, summaries in both languages are sent when the session ends.
Authentication can also be set in the URL in the format of username:password@url.
start.from_lang
One of the two languages in the translation. The first direction in direction is translated into this language; a second direction is translated from it.
Use a code that speech_engine recognizes (with the default Deepgram engine, a code from Deepgram’s Nova-3 language table) and that the voice speaking this language supports.
See direction order.
start.to_lang
The other language in the translation. The first direction in direction is translated from this language; a second direction is translated into it.
Use a code that speech_engine recognizes (with the default Deepgram engine, a code from Deepgram’s Nova-3 language table) and that the voice speaking this language supports.
See direction order.
start.from_voice
The TTS voice that speaks translations into from_lang (the first direction in direction).
A voice that doesn’t start with a lowercase engine prefix live translation supports, such as polly., gcloud., azure. or elevenlabs., is replaced by the default. For example, rachel, amazon.Joanna and Polly.Joanna are all spoken as azure.en-US-RyanMultilingualNeural.
See supported voices & languages.
start.to_voice
The TTS voice that speaks translations into to_lang (a second direction in direction).
A voice that doesn’t start with a lowercase engine prefix live translation supports, such as polly., gcloud., azure. or elevenlabs., is replaced by the default. For example, rachel, amazon.Joanna and Polly.Joanna are all spoken as azure.en-US-RyanMultilingualNeural.
See supported voices & languages.
start.filter_from
Translation filter for translations into to_lang (a second direction in direction).
Adjusts the tone or style of translated speech.
Preset values: polite (removes insults, maintains sentiment), rude (adds insults, maintains sentiment),
professional (removes slang), shakespeare (iambic pentameter), gen-z (Gen-Z slang and expressions).
For custom filters, use the prompt: prefix (e.g., prompt:Use formal business language).
start.filter_to
Translation filter for translations into from_lang (the first direction in direction).
Adjusts the tone or style of translated speech.
Preset values: polite, rude, professional, shakespeare, gen-z.
For custom filters, use the prompt: prefix.
start.live_events
Whether to enable live events.
start.ai_summary
Whether to enable automatic AI summarization. When enabled, AI-generated summaries in both languages will be sent to your webhook when the translation session ends.
start.speech_timeout
The timeout for speech recognition in milliseconds. Minimum value: 1500.
start.vad_silence_ms
Voice activity detection silence time in milliseconds.
Default depends on the speech engine: 700 for Deepgram, 500 for Google. Omitting the value or setting it to 0 uses the engine default.
start.vad_thresh
Voice activity detection threshold. Range: 0 to 1800.
start.debug_level
Debug level for logging. Ignored unless SignalWire has enabled debugging on its side, so you can leave it unset.
start.direction
The call directions to translate, as an ordered array. Possible values: remote-caller, local-caller.
At least one direction is required.
The order of the array decides how from_lang, to_lang, the voices, and the filters are assigned; see direction order.
start.speech_engine
The speech recognition engine to use. Possible values: deepgram, google.
start.ai_summary_prompt
The AI prompt that instructs how to summarize the conversation when ai_summary is enabled.
This prompt is sent to an AI model to guide how it generates the summary.
Direction order
start.direction is an ordered array, and the order decides how the language, voice, and filter settings are applied to each direction:
For example, with from_lang: en-US, to_lang: es-ES, and direction: [remote-caller, local-caller], the remote-caller direction is translated from Spanish into English and spoken with from_voice, and the local-caller direction is translated from English into Spanish and spoken with to_voice. Listing local-caller first swaps these assignments.
Action usage context
Call start: The initial SWML document returned when a call first arrives.
Live call: Actions sent to active calls via the Call Commands REST API or SWML sections executed via transfer or execute during a call.
ai_summary: true(instart): Automatically generates summary when session endssummarizeaction: On-demand summary during an active session