> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # liveTranslate > Start live translation on an active call via REST. Start live translation on an active call. Spoken audio is transcribed and translated in real time to a target language. ## **Request** ### Schema (`calling.live_translate`) ```yaml components: schemas: uuid: type: string format: uuid description: Universal Unique Identifier. title: uuid SWML.Calling.TranscribeDirection: type: string enum: - remote-caller - local-caller title: SWML.Calling.TranscribeDirection SWML.Calling.TranslationFilterPreset: type: string enum: - polite - rude - professional - shakespeare - gen-z description: >- Preset translation filter values that adjust the tone or style of translated speech. - `polite` - Translates to a polite version, removing anything insulting while maintaining sentiment - `rude` - Translates to a rude and insulting version while maintaining sentiment - `professional` - Translates to sound professional, removing slang or lingo - `shakespeare` - Translates to sound like Shakespeare, speaking in iambic pentameter - `gen-z` - Translates to use Gen-Z slang and expressions title: SWML.Calling.TranslationFilterPreset SWML.Calling.CustomTranslationFilter: type: string pattern: ^prompt:.+$ description: >- Custom translation filter with a prompt prefix. Use `prompt:` followed by your custom instructions (e.g., `prompt:Use formal business language`). title: SWML.Calling.CustomTranslationFilter CallingLiveTranslateStartActionStartFilterFrom: oneOf: - $ref: '#/components/schemas/SWML.Calling.TranslationFilterPreset' - $ref: '#/components/schemas/SWML.Calling.CustomTranslationFilter' description: Translation filter for the source language direction. title: CallingLiveTranslateStartActionStartFilterFrom CallingLiveTranslateStartActionStartFilterTo: oneOf: - $ref: '#/components/schemas/SWML.Calling.TranslationFilterPreset' - $ref: '#/components/schemas/SWML.Calling.CustomTranslationFilter' description: Translation filter for the target language direction. title: CallingLiveTranslateStartActionStartFilterTo SpeechEngine: type: string enum: - deepgram - google description: Speech recognition engine options. title: SpeechEngine CallingLiveTranslateStartActionStart: type: object properties: from_lang: type: string description: The language to translate from (e.g., 'en-US'). to_lang: type: string description: The language to translate to (e.g., 'es-ES'). direction: type: array items: $ref: '#/components/schemas/SWML.Calling.TranscribeDirection' description: The direction(s) of the call to translate. from_voice: type: string description: The TTS voice for the source language. to_voice: type: string description: The TTS voice for the target language. filter_from: $ref: '#/components/schemas/CallingLiveTranslateStartActionStartFilterFrom' description: Translation filter for the source language direction. filter_to: $ref: '#/components/schemas/CallingLiveTranslateStartActionStartFilterTo' description: Translation filter for the target language direction. webhook: type: string description: The webhook URL to receive translation events. live_events: type: boolean description: Whether to send real-time translation events. ai_summary: type: boolean description: >- Whether to generate AI summaries in both languages when translation ends. ai_summary_prompt: type: string description: >- The AI prompt that instructs how to summarize the conversation when `ai_summary` is enabled. speech_engine: $ref: '#/components/schemas/SpeechEngine' default: deepgram description: The speech recognition engine to use. speech_timeout: type: integer default: 60000 description: Speech timeout in milliseconds. vad_silence_ms: type: integer description: >- Voice activity detection silence time in milliseconds. Default depends on speech engine: `300` for Deepgram, `500` for Google. vad_thresh: type: integer default: 400 description: Voice activity detection threshold (0-1800). debug_level: type: integer default: 0 description: Debug level for logging (0-2). required: - from_lang - to_lang - direction description: Starts live translation of the call. title: CallingLiveTranslateStartActionStart Calling.LiveTranslateStartAction: type: object properties: start: $ref: '#/components/schemas/CallingLiveTranslateStartActionStart' description: Starts live translation of the call. required: - start description: Starts a live translation session between the two configured languages. title: Calling.LiveTranslateStartAction CallingLiveTranslateSummarizeActionSummarize: type: object properties: webhook: type: string description: The webhook URL to receive the summary. prompt: type: string description: The AI prompt that instructs how to summarize the conversation. description: Request an on-demand AI summary of the translated conversation. title: CallingLiveTranslateSummarizeActionSummarize Calling.LiveTranslateSummarizeAction: type: object properties: summarize: $ref: '#/components/schemas/CallingLiveTranslateSummarizeActionSummarize' description: Request an on-demand AI summary of the translated conversation. required: - summarize description: Requests an on-demand AI summary of the translated conversation. title: Calling.LiveTranslateSummarizeAction CallingLiveTranslateInjectActionInject: type: object properties: message: type: string description: The text message to inject and translate. direction: $ref: '#/components/schemas/SWML.Calling.TranscribeDirection' description: The direction to send the translated message. required: - message - direction description: Inject a message into the conversation to be translated and spoken. title: CallingLiveTranslateInjectActionInject Calling.LiveTranslateInjectAction: type: object properties: inject: $ref: '#/components/schemas/CallingLiveTranslateInjectActionInject' description: Inject a message into the conversation to be translated and spoken. required: - inject description: >- Injects a message into the conversation, translated and spoken in the chosen direction. title: Calling.LiveTranslateInjectAction Calling.LiveTranslateStopAction: type: string enum: - stop description: Stops the live translation session. title: Calling.LiveTranslateStopAction CallingCallRequestDiscriminatorMappingCallingLiveTranslateParamsAction: oneOf: - $ref: '#/components/schemas/Calling.LiveTranslateStartAction' - $ref: '#/components/schemas/Calling.LiveTranslateSummarizeAction' - $ref: '#/components/schemas/Calling.LiveTranslateInjectAction' - $ref: '#/components/schemas/Calling.LiveTranslateStopAction' description: 'The translation action to perform: start, stop, summarize, or inject.' title: CallingCallRequestDiscriminatorMappingCallingLiveTranslateParamsAction CallingCallRequestDiscriminatorMappingCallingLiveTranslateParams: type: object properties: action: $ref: >- #/components/schemas/CallingCallRequestDiscriminatorMappingCallingLiveTranslateParamsAction description: >- The translation action to perform: start, stop, summarize, or inject. status_url: type: string format: uri description: HTTP or HTTPS URL that receives translation-session webhooks. required: - action description: An object of parameters that will be utilized by the active command. title: CallingCallRequestDiscriminatorMappingCallingLiveTranslateParams Calling.CallLiveTranslateRequest: type: object properties: id: $ref: '#/components/schemas/uuid' description: The unique identifying ID of an existing call. params: $ref: >- #/components/schemas/CallingCallRequestDiscriminatorMappingCallingLiveTranslateParams description: An object of parameters that will be utilized by the active command. required: - id - params title: Calling.CallLiveTranslateRequest ``` ## **Response** ### Schema (`Calling.CallResponse`) ```yaml components: schemas: uuid: type: string format: uuid description: Universal Unique Identifier. title: uuid Calling.CallDirection: type: string enum: - inbound - outbound - outbound-api description: The direction of the call. title: Calling.CallDirection CallingCallLegSource: type: string enum: - realtime_api description: Source of this call. title: CallingCallLegSource Calling.ChargeDetails: type: object properties: description: type: string description: Description for this charge. charge: type: number format: double description: Charged amount. required: - description - charge description: One itemized charge applied to the call. title: Calling.ChargeDetails Calling.CallResponseStatus: type: string enum: - queued - initiated - created - ringing - answered - ending - ended - failed - canceled - completed description: The status of the call throughout its lifecycle. title: Calling.CallResponseStatus CallingCallLegType0: type: string enum: - relay_pstn_call title: CallingCallLegType0 CallingCallLegType1: type: string enum: - relay_sip_call title: CallingCallLegType1 CallingCallLegType2: type: string enum: - relay_webrtc_call title: CallingCallLegType2 CallingCallLegType: oneOf: - $ref: '#/components/schemas/CallingCallLegType0' - $ref: '#/components/schemas/CallingCallLegType1' - $ref: '#/components/schemas/CallingCallLegType2' description: Type of this call. title: CallingCallLegType Calling.CallLeg: type: object properties: id: $ref: '#/components/schemas/uuid' description: >- The unique identifier of the call on SignalWire. This can be used to update the call programmatically. from: type: string description: The origin number or address. to: type: string description: The destination number or address. direction: $ref: '#/components/schemas/Calling.CallDirection' description: The direction of the call. source: $ref: '#/components/schemas/CallingCallLegSource' description: Source of this call. url: type: - string - 'null' description: The URL associated with this call. charge: type: number format: double description: Total charge for this call. created_at: type: string format: date-time description: The date and time when the call was created. charge_details: type: array items: $ref: '#/components/schemas/Calling.ChargeDetails' description: Details on charges associated with this call. status: oneOf: - $ref: '#/components/schemas/Calling.CallResponseStatus' - type: 'null' description: The status of the call. duration: type: - integer - 'null' description: The duration of the call in seconds. duration_ms: type: - integer - 'null' description: The duration of the call in milliseconds. billing_ms: type: - integer - 'null' description: The billable duration of the call in milliseconds. type: $ref: '#/components/schemas/CallingCallLegType' description: Type of this call. parent_id: oneOf: - $ref: '#/components/schemas/uuid' - type: 'null' description: The parent call ID if this is a child call. required: - id - from - to - direction - source - url - charge - created_at - charge_details - status - duration - duration_ms - billing_ms - type - parent_id description: Returned when the call is a standard PSTN, SIP, or WebRTC call. title: Calling.CallLeg CallingFabricDeviceLegSource: type: string enum: - realtime_api description: Source of this call. title: CallingFabricDeviceLegSource CallingFabricDeviceLegType: type: string enum: - fabric_subscriber_device_leg description: Type of this call. title: CallingFabricDeviceLegType Calling.FabricDeviceLeg: type: object properties: id: $ref: '#/components/schemas/uuid' description: >- The unique identifier of the call on SignalWire. This can be used to update the call programmatically. from: type: string description: The origin number or address. to: type: string description: The destination number or address. direction: $ref: '#/components/schemas/Calling.CallDirection' description: The direction of the call. source: $ref: '#/components/schemas/CallingFabricDeviceLegSource' description: Source of this call. url: type: - string - 'null' description: The URL associated with this call. charge: type: number format: double description: Total charge for this call. created_at: type: string format: date-time description: The date and time when the call was created. charge_details: type: array items: $ref: '#/components/schemas/Calling.ChargeDetails' description: Details on charges associated with this call. status: description: >- The status of the call. Always null for Fabric subscriber device legs. type: $ref: '#/components/schemas/CallingFabricDeviceLegType' description: Type of this call. required: - id - from - to - direction - source - url - charge - created_at - charge_details - status - type description: >- Returned when the call is a Fabric subscriber device leg. The `status` field is always null for this type. title: Calling.FabricDeviceLeg Calling.CallResponse: oneOf: - $ref: '#/components/schemas/Calling.CallLeg' - $ref: '#/components/schemas/Calling.FabricDeviceLeg' title: Calling.CallResponse ``` ## **Example** ```typescript {9} import { RestClient } from "@signalwire/sdk"; const client = new RestClient({ project: "your-project-id", token: "your-api-token", host: "your-space.signalwire.com" }); await client.calling.liveTranslate("call-id-xxx", { start: { from_lang: "en-US", to_lang: "es-ES", direction: ["local-caller", "remote-caller"], from_voice: "elevenlabs.josh", to_voice: "elevenlabs.josh", }, }); ``` > Start live translation on an active call via REST.