> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gladia.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Translation

> Translate your transcriptions & subtitles

<Badge color="blue" size="lg" icon="file-audio">
  Pre-recorded
</Badge>

<Badge color="green" icon="tower-broadcast" size="lg">
  Live
</Badge>

The **Translation** model generates translations of your transcriptions to one or more targeted languages. If [subtitles](/chapters/audio-intelligence/subtitles) and/or [sentences](/chapters/pre-recorded-stt/features/sentences) are enabled, the translations will also include translated results for them.
You can translate your transcription to **multiple languages** in a single API call.

The list of the languages covered by the Translation feature are listed in [Supported Languages](/chapters/language/supported-languages).

***

**2 translation models** are available:

* `base` : Fast, cover most use cases
* `enhanced` : Slower, but higher quality and with context awareness

## Quickstart

To enable translation, set `translation` to `true` on your request, and add a `translation_config` object :

<CodeGroup>
  ```json Pre-recorded theme={"system"}
  {
    "translation": true,
    "translation_config": {
      "target_languages": [
        "fr"
      ],
      "model": "base",
      "match_original_utterances": true,
      "lipsync": true,
      "context_adaptation": true,
      "context": "<string>",
      "informal": false
    }
  }
  ```

  ```json Live theme={"system"}
  {
    "realtime_processing": {
      "translation": true,
      "translation_config": {
        "target_languages": [
          "fr"
        ],
        "model": "base",
        "match_original_utterances": true,
        "lipsync": true,
        "context_adaptation": true,
        "context": "<string>",
        "informal": false
      }
    },
    "messages_config": {
      "receive_realtime_processing_events": true
    }
  }
  ```
</CodeGroup>

### Translation configuration fields

<ParamField body="target_languages" type="string[]">
  Target language codes for translation output. See the list of supported
  language codes in [>Supported
  Languages](/chapters/language/supported-languages).
</ParamField>

<ParamField body="model" type="enum[&#x22;base&#x22;, &#x22;enhanced&#x22;]" default="base">
  Specifies the translation model to be used.
</ParamField>

<ParamField body="match_original_utterances" type="boolean" default>
  Keep translated segments aligned with source segmentation. Use `true` for subtitles/dubbing; set `false` for a more natural flow in the target language.

  * When **true**, the system attempts to match the translated segments (utterances, sentences) to the timing and structure of the original detected speech segments.
  * When **false**, the translation might be more fluid or natural-sounding in the target language but could deviate from the original utterance segmentation.
</ParamField>

<ParamField body="lipsync" type="boolean" default>
  Controls alignment with visual cues, specifically lip movements. When enabled
  (default), uses an advanced lip synchronization algorithm that aligns
  translated output with speaker's lip movements using timestamps from lip
  activity. \ This enhances viewing experience for dubbed content but may
  occasionally merge distinct words into single objects to achieve better visual
  sync. Set to `false` if strict word-for-word mapping is required over visual
  timing synchronization.
</ParamField>

<ParamField body="context_adaptation" type="boolean" default>
  Enable context-aware translation. When `true`, the model leverages extra
  context and style preferences for better accuracy. Turn off for purely literal
  translations.
</ParamField>

<ParamField body="context" type="string" placeholder="&#x22;Medical consultation between doctor and patient discussing cardiology&#x22;">
  Additional context to improve terminology, proper nouns, or disambiguation.
  Effective with `context_adaptation: true`. \
  **Example**: `"Medical consultation between doctor and patient discussing cardiology"`
</ParamField>

<ParamField body="informal" type="boolean" default={false}>
  Prefer informal register when available; useful for chatty UX or youth
  audiences. Especially relevant for languages with formal/informal distinctions
  (e.g., French "tu/vous", German "du/Sie", Spanish "tú/usted", Dutch "U/jij").
</ParamField>

## Result

The transcription result will contain a `"translation"` key with the output of the model:

<CodeGroup>
  ```json Pre-recorded theme={"system"}
  {
    "transcription":{...},
    "translation": {
      success: true,
      is_empty: false,
      results: [
        {
          words: [
            {
              word: "Diviser",
              start: 0.20043,
              end: 0.7008000000000001,
              confidence: 1
            },
            {
              word: "l'infini",
              start: 0.9009500000000001,
              end: 1.5614400000000002,
              confidence: 1
            },
            ...
          ],
          languages: ["fr"],
          full_transcript: "Diviser l'infini dans un temps où moins est plus...",
          utterances: [Array], // Also translated
          error: null
        },
        {
          words: [
            {
              word: "Dividir",
              start: 0.20043,
              end: 0.7008000000000001,
              confidence: 1
            },
            {
              word: "la infinidad",
              start: 0.9009500000000001,
              end: 1.5614400000000002,
              confidence: 1
            },
            ...
          ],
          languages: ["es"],
          full_transcript: "Dividir la infinidad en un tiempo en que menos es más...",
          utterances: [Array], // Also translated
          error: null
        }
      ],
      exec_time: 0.6475496292114258,
      error: null
    }
  }
  ```

  ```json Live theme={"system"}
  {
    "session_id": "550e8400-e29b-41d4-a716-446655440000",
    "created_at": "2025-09-19T12:34:20Z",
    "type": "translation",
    "error": null,
    "data": {
      "utterance_id": "utt_001",
      "utterance": {
        "text": "buenos días",
        "language": "es",
        "start": 4.2,
        "end": 6.1
      },
      "original_language": "es",
      "target_language": "en",
      "translated_utterance": {
        "text": "good morning",
        "language": "en",
        "start": 4.2,
        "end": 6.1
      }
    }
  }
  ```
</CodeGroup>

<Tip>
  If you enabled the `subtitles` generation, those will also benefits from the
  translation model.
</Tip>

## Best practices

* Set `target_languages` to only the languages you need.
* Use `enhanced` with `context_adaptation` for high-accuracy, domain-heavy content.
* Provide a meaningful `context` to improve terminology and named entities.
* Keep `match_original_utterances: true` for subtitles; set to `false` for a more natural flow.
* Pair with [language detection](/chapters/language/language-detection) and [code switching](/chapters/language/code-switching) when source language may vary.
