Skip to navigation

liveTranslate

View as MarkdownOpen in Claude

Start, summarize, or stop live translation on an active call. Spoken audio is transcribed and translated in real time, and each party hears the other in their own language. Pass the action as the second argument: a start, summarize, or inject object, or the string "stop".

Request

idstringRequiredformat: "uuid"
The unique identifying ID of an existing call.
paramsobjectRequired
An object of parameters that will be utilized by the active command.

Response

Call LegobjectRequired
Returned when the call is a standard PSTN, SIP, or WebRTC call.
OR
Fabric Subscriber Device LegobjectRequired

Returned when the call is a Fabric subscriber device leg. The status field is always null for this type.

Example

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",
},
});