subclip-dubbing
Translate and dub an existing Subclip timeline audio/video item under assistant control using exact captions, speaker-aware temporary voices, bounded TTS retries, duration-fit review, atomic timeline placement, and translated visual-caption replacement when captions were already shown. Use for translated voice replacement or multilingual dubbing; do not route this workflow through the separate Dub Studio/Dubbing API.
Subclip Assistant Dubbing
The assistant owns translation and semantic timing decisions. MCP tools own source extraction, temporary voice lifecycle, speech generation, measurement, placement, accounting, and cleanup.
- Identify one exact audible
mediaItemIdoraudioItemId. If it lacks exact-item captions, look for a saved transcript withlist_reference_transcripts; otherwise calltranscribe_projectwithpurpose: "reference". For multiple speakers usemode: "cloud"anddetectSpeakers: true; wait for its terminal callback. - Call
create_dubbing_workspacefor that item, passingreferenceTranscriptIdwhen using a saved reference transcript. Read every page withget_dubbing_workspace. Keep segment IDs, speaker IDs, and timing windows unchanged. - Translate each segment yourself and call
update_dubbing_translations. Preserve meaning, intent, names, numbers, dates, negation, calls to action, and other returnedlockedTerms.- Prefer a natural concise equivalent before paid TTS when a translation is marked
likely-overflow. - Remove redundancy and choose shorter idioms; never delete a required fact merely to fit.
- A short translation may leave natural silence. Expand it only when tighter sync matters and an equally faithful phrasing exists; never invent filler or facts.
- Prefer a natural concise equivalent before paid TTS when a translation is marked
- Configure every speaker independently.
- For a system or already-saved voice, call
list_ai_voices, thenset_dubbing_speaker_voicewith the exact stable ID. - Call
prepare_dubbing_temporary_voiceonly when the creator explicitly asks to clone, preserve, match, or use the source speaker’s voice. A generic “translate/dub” request does not authorize voice cloning. - Prepare one temporary speaker voice at a time and wait for its terminal callback before starting the next clone.
referenceMode: "source"extracts only that diarized speaker’s non-overlapping source passages.referenceMode: "attachment"requires an exact current-conversation attachment. Never import either reference into AudioPanel.- Never assign one reference to several detected speakers unless the creator explicitly requests one common voice. If a speaker lacks enough clean source speech, use an authorized attachment/system voice or ask; do not silently reassign the speaker.
- For a system or already-saved voice, call
- Call
generate_dubbing_segmentsin batches of at most 12. A direct request for this exact dubbing workflow authorizes the first matching bounded batch; passconfirmed: true. Do not start another batch until the terminal callback or workspace state proves the prior batch is terminal. - After completion, call
get_dubbing_workspaceand use measured duration, not character count, as truth.actualDurationRatio <= 1.08is normally safe for a mild final speed fit.- Above the chosen maximum speedup, rewrite that segment more concisely with
update_dubbing_translations, then regenerate only that segment. - A substantially short result may be rewritten with a longer equivalent when exact sync matters; otherwise preserve natural silence.
- Never truncate speech. Never exceed the workspace attempt cap or the creator’s credit ceiling. A failed operation is not permission to regenerate unrelated/completed segments.
- Call
commit_dubbing_workspaceonly when every segment is completed and semantically reviewed. Commit downloads and imports all segment audio first, then atomically mutes the exact original source when the workspace requests replacement. It never stretches a short audio source across a longer Remotion trim window. UsecaptionReplacement.hadVisibleSourceCaptionsandcaptionReplacement.sourceItemIdfrom the result as the canonical caption-replacement decision; do not try to reconstruct ownership after the hidden workspace is cleaned. - If the source had visible captions, caption the committed dubbed audio too.
- Keep the source-language captions visible as a fallback until every new caption batch succeeds. Preserve the existing project-wide caption style; transcription must change caption content/timing, not restyle it.
- When the committed dubbed items are the finished audible timeline, call
transcribe_projectonce withallTimelineClips: trueand the target language. This mixes every audible dubbed clip, saves one coherent target-language transcript, and atomically replaces the complete old caption set; do not guess or wait for individual item IDs. - Pass a base ISO language code such as
fr,es, orde, not a regional locale such asfr-FR. The local runtime normalizes accepted locale inputs, but canonical codes keep cloud/local behavior consistent. - Follow an explicitly requested local/cloud mode. Otherwise use local transcription for clean generated speech. Do not request diarization again: speaker separation was already established by the dubbing workspace.
- Use per-item transcription only when the creator explicitly wants bilingual captions or needs independently owned caption batches. In that case use the exact IDs returned by
commit_dubbing_workspace.imported, transcribe chronologically, and remove the original source batch only after the final new batch succeeds. - After the terminal callback, verify visible target-language captions and confirm the source-language batch is absent when replacement was requested. If transcription fails, the editor keeps the previously saved captions as fallback; retry or report the failed run without manually clearing caption data.
- If the creator abandons the uncommitted workflow, call
discard_dubbing_workspacewithconfirmed: trueafter all running jobs are terminal.
The hidden .agent/dubbing/<workspaceId>/plan.md is scratch context; state.json is canonical. Temporary provider voices, reference samples, intermediate cloud speech operations, and the hidden workspace are cleanup-owned. Do not copy provider voice IDs or signed URLs into captions, director notes, or user-facing text.
- Downloads
- 84All time
- Security audit
- Pass
- Last updated
- 2d ago
- Current version
- v1.0.0
- License
- MIT-0
