Skip to navigation
Calling

live_translate

View as MarkdownOpen in Claude

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
objectRequired

An object that accepts the following properties.

live_translate.action
string | objectRequired

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.

action.start
objectRequired

Start a live translation session.

start.webhook
string

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
stringRequired

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
stringRequired

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
stringDefaults to azure.en-US-RyanMultilingualNeural

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
stringDefaults to azure.en-US-RyanMultilingualNeural

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
string

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
string

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
booleanDefaults to false

Whether to enable live events.

start.ai_summary
booleanDefaults to false

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
integerDefaults to 60000

The timeout for speech recognition in milliseconds. Minimum value: 1500.

start.vad_silence_ms
integerDefaults to 700 | 500

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
integerDefaults to 400

Voice activity detection threshold. Range: 0 to 1800.

start.debug_level
integerDefaults to 0

Debug level for logging. Ignored unless SignalWire has enabled debugging on its side, so you can leave it unset.

start.direction
string[]Required

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
stringDefaults to deepgram

The speech recognition engine to use. Possible values: deepgram, google.

start.ai_summary_prompt
string

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:

Position in directionTranslated fromTranslated intoVoiceFilter
Firstto_langfrom_langfrom_voicefilter_to
Second, if presentfrom_langto_langto_voicefilter_from

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

ActionCall startLive call
start✅ Primary use✅ Can start mid-call
stop❌ No session to stop✅ Designed for this
summarize❌ No content to summarize✅ Designed for this
inject❌ No session exists✅ Designed for this

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 vs summarize action
  • ai_summary: true (in start): Automatically generates summary when session ends
  • summarize action: On-demand summary during an active session

Examples

version: 1.0.0
sections:
main:
- answer: {}
- live_translate:
action:
start:
webhook: 'https://example.com/webhook'
from_lang: en-US
to_lang: es-ES
from_voice: elevenlabs.josh
to_voice: elevenlabs.josh
live_events: true
direction:
- remote-caller
- local-caller
speech_engine: deepgram