Skip to content

Dubbing - Replace Soundtrack with New Audio

🎬 Overview

VideoDB makes video dubbing incredibly simple with AI-powered translation and voice synthesis. With just one function call, you can dub your videos into multiple languages while preserving the original speaking style and timing.
No need for complex audio editing, timeline manipulation, or third-party tools. VideoDB’s coll.dub_video() handles everything automatically.

🔧 Prerequisites

Ensure you have VideoDB installed in your environment:
!pip install videodb
You’ll also need a VideoDB API key, which can be obtained from the . (Free for first 50 uploads, no credit card required! 🎉)

🌐 Connect to VideoDB

Connect to VideoDB using your API key:
import videodb
import os
from getpass import getpass

# Prompt user for API key securely
api_key = getpass("Please enter your VideoDB API Key: ")
os.environ["VIDEO_DB_API_KEY"] = api_key

conn = videodb.connect()
coll = conn.get_collection()

print("✅ Connected to VideoDB")

📺 Upload Your Video

Upload the video you want to dub. For this example, we’ll use an English video:
# Upload the original video (English)
video_url = "https://www.youtube.com/watch?v=0e3GPea1Tyg"
video = coll.upload(url=video_url)

print(f"✅ Video uploaded: {video.id}")

Preview the Original

video.play()

🎯 Dub Your Video

Here’s where the magic happens! Dub your video into any supported language with a single function call:
# Dub the video into Hindi
dubbed_video = coll.dub_video(
video_id=video.id,
language_code="hi" # Hindi
)

print(f"✅ Video dubbed successfully: {dubbed_video.id}")
That’s it! VideoDB automatically dubbed.

▶️ View the Dubbed Video

Generate and play your dubbed video:
dubbed_video.play()

🌍 Supported Languages

VideoDB supports dubbing into many languages. Simply change the language_code parameter:
Language
Code
Language
Code
Spanish
es
Japanese
ja
French
fr
Korean
ko
German
de
Chinese (Simplified)
zh
Italian
it
Arabic
ar
Portuguese
pt
Russian
ru
Hindi
hi
… and more!

Example: Dub into Spanish

# Dub the same video into Spanish
spanish_dubbed = coll.dub_video(
video_id=video.id,
language_code="es" # Spanish
)

print(f"✅ Spanish version created: {spanish_dubbed.id}")

# Play the Spanish version
spanish_dubbed.play()

💡 Use Cases

Content Localization: Reach global audiences by dubbing your content into multiple languages
Educational Content: Make learning materials accessible in students’ native languages
Marketing Videos: Create localized versions of promotional content
Entertainment: Dub movies, shows, or vlogs for international viewers
Accessibility: Provide dubbed versions for audiences who prefer audio in their native language

🎉 Wrap-up

With VideoDB’s coll.dub_video(), video dubbing is as simple as querying a database. No complex audio editing, no timeline manipulation - just one function call to create professional multilingual content.
Start dubbing your videos today and reach audiences worldwide! 🌍✨

 
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.