Skip to main content

Overview

Translate the audio of any video into another language while preserving the original speaker’s voice characteristics. Dubbing is useful for content localization, accessibility, and reaching global audiences without re-recording. The dubbing pipeline is asynchronous: you submit a job, poll until it completes, then retrieve the dubbed output.

Prerequisites

1

Create an account

Sign up at CAMB.AI Studio if you haven’t already.
2

Get your API key

Go to Settings → API Keys in Studio and copy your key. See Authentication for details.
3

Install the SDK

Skip this step if you’re using the direct API.
4

Set your API key to use in your code


Code


Parameters

Required

ParameterTypeDescription
video_urlstringPublicly accessible URL of the source video (YouTube links and direct URLs are supported)
source_languageLanguages enumLanguage spoken in the source video
target_languagesLanguages[]List of languages to dub into. Pass a single-element list ([Languages.HI_IN]) for one target, or multiple to dub into several languages in a single job.

Optional

ParameterTypeDescription
target_languageLanguages enumSingle-language convenience alternative to target_languages. Prefer target_languages=[Languages.HI_IN] — target_language exists for backwards compatibility.
project_namestringLabel for the job in your dashboard
project_descriptionstringAdditional notes for the job
selected_audio_tracksinteger[]Specific audio track indices from the source video
add_output_as_an_audio_trackbooleanAttach the dubbed audio as an extra track instead of replacing the original

Language Enum

Use the Languages enum (Python) or CambApi.Languages (TypeScript) to specify languages:

Tips

  • Video URL: The URL must be publicly accessible. YouTube video links and direct file URLs (MP4, WebM) are both supported.
  • Polling timeout: For long videos, cap your polling loop (e.g. 60 attempts × 5s = 5 minutes) and handle the timeout gracefully.
  • Multiple targets: target_languages accepts an array — pass several languages to dub into all of them in a single job, which is more efficient than submitting separate jobs.
  • Transcripts: The result object includes a transcript field with per-segment timing data, useful for subtitle generation.

Next Steps

End-to-End Dubbing API

Full API reference for the dubbing endpoint.

Get Dubbing Status

Status polling endpoint reference.

Get Dubbed Run Info

Retrieve the dubbed output URLs and transcript.

Voice Cloning

Clone a custom voice for use in speech generation.