Skip to main content
Glama

Dub a video into other languages

dubbing

Translate and re-voice a video's speech into multiple languages, saving a separate MP4 file per target language for multilingual distribution.

Instructions

Dub a video into one or more other languages and save one dubbed video file per language. The speech is translated and re-voiced; the result is a new .mp4 per target language, not an audio track.

⚠️ COST WARNING: This tool makes an API call to Sonilo which may incur charges, and you are billed PER LANGUAGE — asking for four languages costs four times as much as one. Free preview: a self-serve account's first call with ONE language and no subtitles is free — the video is trimmed to its first 15 seconds and translated at no charge, and the result carries trial_preview with what the full video would cost. Every call after that, and any call with several languages or subtitles, is billed. Only use when explicitly requested by the user.

This call polls until the backend finishes and waits AT LEAST TWO HOURS before giving up, regardless of any shorter configured timeout — two hours is the backend's own ceiling for the job. A call that sits for an hour or more is normal, not a hang; do not cancel it, since the task keeps running and charging on the backend either way and a cancelled call just loses the caller's easy path to the result.

Args: video_path (str, optional): Absolute local path, or relative to SONILO_MCP_BASE_PATH. Supports .mp4/.mov/.webm/.m4v/.gif (gif must be animated). Subject to the account's max upload size (typically 300 MB). Maximum video duration is 300 seconds (5 minutes). video_url (str, optional): HTTPS URL to a video file. Must be https specifically — the dubbing pipeline fetches the source itself and rejects plain http. languages (list, optional): Target language codes, e.g. ["es", "fr"]. Supported: en, zh_cn, ja, ko, pt, pt_br, es, es_419, de, fr, it, ru, th, ar, tr, vi, id, ta, ml, kn, gu, pa_in, sd_in, hi. pt_br is Brazilian Portuguese and es_419 Latin American Spanish; plain pt and es give unqualified Portuguese and Spanish, so pick the regional code when the region matters. ar is likewise unqualified Arabic, not a country dialect. pa_in and sd_in are Punjabi and Sindhi as spoken in India, the only variants available; hi is Hindi. Omit to get the default ["zh_cn", "es", "fr"]. ducking (bool, optional): Duck the background music/effects bed under the dubbed voice while it speaks. Off by default: the bed is always kept, at a constant level unless this is true. Free. lipsync (bool, optional): Whether the speaker's mouth is re-rendered to match the dubbed speech. On by default. Set false to leave the picture completely untouched instead — the video comes back at its original resolution and frame rate rather than re-rendered, and only the audio is replaced, so the mouths keep moving to the original language. Use it for footage with no on-camera speaker, or when preserving the exact original picture matters more than matching lip movement. The background bed is rebuilt either way, so ducking is unaffected. subtitles (dict, optional): One script per target language, e.g. {"es": "/path/es.srt", "fr": "https://example.com/fr.vtt"}. Each value is either a local .srt/.vtt path (absolute, or relative to SONILO_MCP_BASE_PATH) or an https URL. These are TARGET-language scripts carrying the lines to be spoken in that language — not a transcript of the source — and they replace the pipeline's own translation. The keys must match the languages being dubbed exactly; the backend rejects a missing or extra one. export_srt (bool, optional): After the dub, align each language's final audio against its script and also return a re-timed .srt keeping those lines verbatim. Requires subtitles. Off by default. output_directory (str, optional): Where to save the results. Defaults to SONILO_MCP_BASE_PATH.

Exactly one of video_path and video_url must be provided.

Returns: One TextContent per saved file, named dubbing-<first 8 chars of the task id>..mp4, plus dubbing-<first 8 chars of the task id>..srt when export_srt was used — each reported with that language's export status and alignment loss. A language whose export was blocked still gets its dubbed video and is reported as a note, not a failure. On timeout the error message includes the task_id — recover with get_sfx_task.

Input Schema

NameRequiredDescriptionDefault
duckingNo
lipsyncNo
languagesNo
subtitlesNo
video_urlNo
export_srtNo
video_pathNo
output_directoryNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.28.0

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare the generic profile (not read-only, open-world, non-idempotent); the description goes far beyond with billing semantics, the two-hour backend ceiling, and the crucial "an hour-long wait is normal, not a hang — do not cancel" guidance plus the fact that the job keeps charging server-side even if abandoned. It stops just short of stating idempotency/retry behavior explicitly, so it isn't flawless, but the destructive-in-wallet sense is unusually well disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then the cost warning before anything else — correct priority given real billing risk. The Args and Returns blocks are dense but largely non-redundant; the Returns section is somewhat long given an output schema exists, and a few clauses (background bed rebuilt, ducking unaffected) repeat context. Justified in size overall, not padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, zero-schema-coverage, expensive, long-polling call, essentially every decision an agent must make is covered: input format limits (300s duration, 300MB, https-only), default languages, billing, expected wait, cancellation policy, and timeout recovery via get_sfx_task. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the entire burden and does: language codes are enumerated with regional disambiguation (pt vs pt_br, es vs es_419, ar caveat), subtitles are clarified as TARGET-language scripts rather than source transcripts with a key-matching constraint, lipsync's false branch is spelled out in consequence terms, and the exactly-one-of constraint on video_path/video_url is stated. This is meaning the schema cannot provide.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Dub a video into one or more other languages") and immediately disambiguates the output form: "the result is a new .mp4 per target language, not an audio track" — which separates it from audio_ducking and the video_to_sound siblings. An agent can identify the tool without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit gating: "Only use when explicitly requested by the user," plus a concrete free-preview path (one language, no subtitles, 15-second trim) and a stated cost multiplier per language. It also gives a positive condition for the non-default branch ("Use it for footage with no on-camera speaker"). This is the when/when-not/alternative pattern at full strength.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.