Documentation Index Fetch the complete documentation index at: https://docs.videodb.io/llms.txt
Use this file to discover all available pages before exploring further.
Dub videos into new languages or translate transcripts for subtitles. Support for 20+ languages with automated voice matching.
Quick Example
import videodb
conn = videodb.connect()
coll = conn.get_collection()
video = coll.get_video( "m-xxx" )
# Dub video to Spanish
dubbed = coll.dub_video(
video_id = video.id,
language_code = "es"
)
dubbed.play()
# Translate transcript to French
video.index_spoken_words()
french_transcript = video.translate_transcript( language = "fr" )
Video Dubbing
Replace the audio track with AI-generated voices in another language.
dubbed = coll.dub_video(
video_id = video.id,
language_code = "hi" , # Hindi
callback_url = "https://your-backend.com/webhooks/dubbing"
)
# Returns a new video object
dubbed.play()
Parameters
Parameter Type Default Description video_idstr required Source video ID language_codestr required Target language (ISO 639-1) callback_urlstr None Webhook URL when complete
Supported Languages
Language Code Language Code Spanish esHindi hiFrench frJapanese jaGerman deKorean koItalian itChinese zhPortuguese ptArabic arDutch nlRussian ruPolish plTurkish tr
Transcript Translation
Translate the spoken content for subtitles or text-based use cases.
Step 1: Index Spoken Words
# Required before translation
video.index_spoken_words()
Step 2: Translate
# Translate to French
french_text = video.translate_transcript(
language = "fr" ,
additional_notes = "Use formal tone"
)
print (french_text)
Parameters
Parameter Type Default Description languagestr required Target language (ISO 639-1) additional_notesstr ""Style guidance for translation callback_urlstr None Webhook URL
Style Guidance Examples
# Formal business content
additional_notes = "Use formal business language appropriate for corporate presentations"
# Casual content
additional_notes = "Use casual, conversational tone"
# Technical content
additional_notes = "Preserve technical terms in English where no equivalent exists"
# Marketing content
additional_notes = "Adapt cultural references for the target audience"
Use Cases
Global Product Launch
# Upload marketing video
video = coll.upload( url = "https://example.com/product-launch.mp4" )
# Create versions for key markets
languages = [ "es" , "fr" , "de" , "ja" , "zh" ]
for lang in languages:
dubbed = coll.dub_video(
video_id = video.id,
language_code = lang,
callback_url = f "https://backend.com/webhooks/dubbing/ { lang } "
)
Educational Content
# Upload lecture video
lecture = coll.upload( url = "https://example.com/lecture.mp4" )
lecture.index_spoken_words()
# Generate subtitles in multiple languages
for lang in [ "es" , "fr" , "pt" , "zh" ]:
translated = lecture.translate_transcript(
language = lang,
additional_notes = "Educational content, maintain academic tone"
)
# Use with CaptionAsset for subtitles
Customer Support
# Dub support video for regional markets
support_video = coll.get_video( "m-support-tutorial" )
# Create localized versions
regional_versions = {
"LATAM" : "es" ,
"Brazil" : "pt" ,
"France" : "fr" ,
"Germany" : "de"
}
for region, lang in regional_versions.items():
coll.dub_video(
video_id = support_video.id,
language_code = lang,
callback_url = f "https://backend.com/webhooks/ { region } "
)
Best Practices
Pre-Dubbing Checklist
Check Why Clear audio Reduces transcription errors Single speaker Better voice matching Minimal background music Cleaner dubbing result Proper pacing Allows for language expansion
Language Expansion
Different languages have different word counts for the same content:
Original (English) Expansion German +15-20% French +15-20% Spanish +10-15% Japanese -10-15% Chinese -20-30%
Plan for this when timing is critical.
Quality Review
After dubbing:
Check lip sync on close-ups
Verify tone matches content
Review technical term pronunciation
Test with native speakers
Async Processing
Dubbing is a long-running operation. Use callbacks:
# Start dubbing (returns immediately when callback_url is provided)
dubbed = coll.dub_video(
video_id = video.id,
language_code = "ja" ,
callback_url = "https://your-backend.com/webhooks/dubbing"
)
print ( f "Processing video ID: { dubbed.id } " )
# When callback_url is not provided, SDK returns video object once process is done
dubbed = coll.dub_video(
video_id = video.id,
language_code = "ja"
)
# This will wait and return the completed video object
Webhook Response
When the dubbing process completes, your webhook receives:
{
"success" : true ,
"data" : {
"id" : "m-dubbed-xxx" ,
"collection_id" : "c-xxx" ,
"name" : "dubbed_video" ,
"extension" : "mp4" ,
"size" : "12345678"
}
}
What You Can Build
Video Dubbing Localize videos into multiple languages automatically
AI Voiceovers Generate narration in different languages
Next Steps
Safety & Approvals Review workflows before publishing
Subtitles Guide Add styled subtitles to videos