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
Create an account
Sign up at CAMB.AI Studio if you haven’t already.
Get your API key
Go to Settings → API Keys in Studio and copy your key. See Authentication for details.
Install the SDK
Code
Parameters
Required
| Parameter | Type | Description |
|---|---|---|
video_url | string | Publicly accessible URL of the source video (YouTube links and direct URLs are supported) |
source_language | Languages enum | Language spoken in the source video |
target_languages | Languages[] | 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
| Parameter | Type | Description |
|---|---|---|
target_language | Languages enum | Single-language convenience alternative to target_languages. Prefer target_languages=[Languages.HI_IN] — target_language exists for backwards compatibility. |
project_name | string | Label for the job in your dashboard |
project_description | string | Additional notes for the job |
selected_audio_tracks | integer[] | Specific audio track indices from the source video |
add_output_as_an_audio_track | boolean | Attach the dubbed audio as an extra track instead of replacing the original |
Language Enum
Use theLanguages 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_languagesaccepts 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
transcriptfield 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.