Skip to content
Console

Translate

translate consumes speech audio and emits translated speech audio plus avflow.translateText data events. It is a managed AVFlow node; jobs only need to set the target language.

{
"name": "translator",
"type": "translate",
"inputs": ["speaker_audio"],
"config": {
"targetLanguage": "zh-CN",
"echoTargetLanguage": false
}
}
FieldTypeRequiredDescription
targetLanguagestringYesBCP-47 target language, for example zh-CN
echoTargetLanguagebooleanNoAllow target-language speech in the input to pass through
  • Audio: translated speech.
  • Data: avflow.translateText with text, kind (source or translation), language, and isFinal.

Route video separately when producing an audiovisual output:

{
"name": "hls",
"type": "segment",
"inputs": [
"video",
"translated_audio",
{ "name": "translator", "select": { "mediaTypes": ["data"] } }
]
}

Translation requires source context, so translated speech normally trails the source video. For audiovisual outputs that use translated audio, AVFlow applies its managed timing policy automatically when the audio path resolves to exactly one translate node; no extra graph node or edge is required. The output may hold the first frame briefly while timing stabilizes.

The translated audio track appears with the first translated audio packet. It preserves the provider’s sample rate and channel layout, and idle periods are timestamp gaps rather than generated silence. Add an audio_mixer when downstream components require a continuously clocked audio stream.

The timing policy is skipped when the graph is ambiguous, such as when multiple translation nodes feed the same audio path or original and translated speech are mixed together. In those cases, split outputs or use a single translated audio path for the audiovisual output.

Small long-term drift can be corrected with bounded audio time stretching or silence insertion. It should not be corrected by repeatedly dropping video frames.