# Dub a video

> English to Spanish, with cloned voices, a chosen voice, or a voice-over.

Each variant below is a complete `POST /projects` body. Create the project, upload files, collect
`${name}.es.mp4` for each.

## Cloned voices (the default choice)

Deepdub clones every speaker's voice in Spanish. The original background (music, effects) is
kept and the English voices are removed. The video carries the original audio as its first track
and the Spanish dub as a second track, so a player opens it on the original and the dub is a
choice in its audio menu. For a video that plays the dub when it opens, see
[Only the dub](#only-the-dub).

```json JSON
{
"name": "Fishing Channel S01 — Spanish",
"config": {
  "sourceMedia": { "@type": "S3FolderSource" },
  "transcription": { "@type": "Speechmatics", "language": "en" },
  "translations": [
    {
      "language": "es",
      "engine": { "@type": "Gemini" },
      "ttsOptions": { "provider": { "@type": "Deepdub", "voice": "auto" } }
    }
  ],
  "outputs": [
    {
      "@type": "S3FolderOutput",
      "items": [
        {
          "@type": "VideoFile",
          "ext": "mp4",
          "nameTemplate": "${name}.es.${ext}",
          "useOriginalTracks": true,
          "dubTracks": [{ "language": "es", "title": "Spanish" }]
        }
      ]
    }
  ]
}
}
```

```yaml YAML
name: Fishing Channel S01 — Spanish
config:
sourceMedia: { '@type': S3FolderSource }
transcription: { '@type': Speechmatics, language: en }
translations:
  - language: es
    engine: { '@type': Gemini }
    ttsOptions:
      provider: { '@type': Deepdub, voice: auto }
outputs:
  - '@type': S3FolderOutput
    items:
      - '@type': VideoFile
        ext: mp4
        nameTemplate: '${name}.es.${ext}'
        useOriginalTracks: true
        dubTracks:
          - { language: es, title: Spanish }
```

## Latin American Spanish

Set the pronunciation locale. Without it, `es` is spoken with the default locale for Spanish.

```json
"ttsOptions": {
  "provider": { "@type": "Deepdub", "voice": "auto" },
  "locale": "es-XL"
}
```

## One voice for everyone

Pick a voice from a provider's catalogue instead of cloning. Every speaker then sounds the same,
which suits narration and single-presenter content:

```json Azure
"ttsOptions": { "provider": { "@type": "Azure", "voice": "es-ES-ElviraNeural" } }
```

```json Google
"ttsOptions": { "provider": { "@type": "Google", "voice": "es-ES-Standard-A" } }
```

```json Amazon Polly
"ttsOptions": { "provider": { "@type": "Amazon", "voice": "Lucia", "engine": "NEURAL" } }
```

For a different catalogue voice for each speaker, `{"@type": "MultiVoice"}` chooses them for you
from SyncWords' voices for the language: see [Dubbing](/vod-express/configuration/dubbing#voice-providers).

## Voice-over

Keep the original speech audible under the Spanish voice, as in news and documentaries:

```json
"ttsOptions": {
  "provider": { "@type": "Azure", "voice": "es-ES-ElviraNeural" },
  "originalAudioSplitting": false
}
```

Lower `originalAudioVolume` (default `1`) to push the original further back.

## Spanish into English

Any direction works: set the transcription language to the spoken one.

```json
{
  "name": "Entrevistas — English",
  "config": {
    "sourceMedia": { "@type": "S3FolderSource" },
    "transcription": { "@type": "Speechmatics", "language": "es" },
    "translations": [
      {
        "language": "en",
        "engine": { "@type": "DeepL" },
        "ttsOptions": { "provider": { "@type": "Azure", "voice": "en-US-PhoebeMultilingualNeural" } }
      }
    ],
    "outputs": [
      {
        "@type": "S3FolderOutput",
        "items": [
          {
            "@type": "VideoFile",
            "ext": "mp4",
            "nameTemplate": "${name}.en.${ext}",
            "useOriginalTracks": true,
            "dubTracks": [{ "language": "en", "title": "English" }]
          }
        ]
      }
    ]
  }
}
```

## Only the dub

Leave `useOriginalTracks` out for a video that carries the Spanish track alone, which a player
opens on:

```json
"dubTracks": [{ "language": "es", "title": "Spanish" }]
```

## Matroska instead of MP4

The item, in the `S3FolderOutput`'s `items`:

```json
{
  "@type": "VideoFile",
  "containerFormat": "matroska",
  "ext": "mkv",
  "nameTemplate": "${name}.es.${ext}",
  "useOriginalTracks": true,
  "dubTracks": [{ "language": "es", "title": "Spanish" }]
}
```
