Command · Translate Captions
captions.translate
Translates a caption track into new caption tracks, one per language, keeping the cue timing: cues that would read too fast in the target language borrow time from the gaps, merge with a neighbour or move words across, and text that does not fit two lines is split into more cues (Thai broken between words).
- v1
- Capability EditSequence
- Tool
captions_translate
Request
{
"command": "captions.translate",
"params": {
"languages": [
"th",
"ja"
],
"provider": "auto"
}
}Parameters
captionTrackinteger (1..)- The caption track to translate; only needed when the sequence has several.
estimateboolean- Only price the cloud translation; nothing is sent or changed (default false).
glossaryobject[]- Terms and how to translate them (a term mapped to itself stays as it is: names, brands).
glossary[].sourcestringRequiredglossary[].targetstringRequiredlanguagesstring[], min 1Required- Target languages, ISO 639-1 ("th", "ja", "es", "zh-Hant" ...): one new caption track each.
notesstring- Extra instructions for a cloud model (audience, who speaks).
provider`auto` | `local` | `cloud`- Who translates: a local model on this computer, the user's cloud model, or "auto" (local when a model for the pair is installed, else the cloud model unless the project is no-cloud; default).
readingSpeednumber (2.0..40.0)- Characters per second the new captions may ask of a reader (default: the language's, e.g. English 20, Thai 17, Japanese 4).
replaceboolean- Replace an earlier translation of this track into the same language (default true).
sequenceinteger (1..)- Sequence id; only needed when the project has several.
sourceLanguagestring- The captions' language when the track does not say (ISO 639-1).
tone`neutral` | `casual` | `formal` | `playful`- The register of a cloud translation (default neutral).
Discussion
Translates a caption track into new caption tracks, one per language, keeping the cue timing: cues that would read too fast in the target language borrow time from the gaps, merge with a neighbour or move words across, and text that does not fit two lines is split into more cues (Thai broken between words). The corrections layer applies first, and bleeped words stay "[bleep]" (never sent as content). A local model (OPUS-MT, on this computer) or the user's cloud model (consent and spend cap; caption text only) with a glossary and a tone. One undo step; "estimate" prices a cloud run first.
Run it with wabcut-cli cmd <project> --json, from an MCP client as captions_translate, or from an extension. See Edit commands for requests, references and results.
See also
captions.*
- captions.addCue
Add Caption. Adds a cue from "start" to "end" (or for "duration").
- captions.addTrack
New Caption Track. Adds an empty caption track, styled by a preset (built in: Clean, Bold Box, Podcast, Shorts, Thai-friendly; or one of the project's) and/or style fields.
- captions.applyPreset
Apply Caption Preset. Gives a caption track the style of a preset: built in (Clean, Bold Box, Podcast, Shorts, Thai-friendly) or one of the project's.
- captions.generate
Generate Captions. Makes a caption track from the transcript: cues of at most maxLines lines of maxCharsPerLine characters and maxDuration seconds, broken at pauses, speaker changes and sentence ends; Thai lines break between words, never at spaces that are not there.
- captions.generateFromTranscript
Captions from Transcript. Makes a caption track from the sequence's transcript (with the project's corrections and speakers): cues of at most maxLines lines of maxCharsPerLine characters and maxDuration, broken at pauses, speaker changes and (optionally) sentence ends, at least "gap" apart.
- captions.get
Caption Cues. The cues of a caption track (default: the sequence's first) as arrays in cueFields order: start, end, text (its lines joined by newlines).
- captions.mergeCues
Merge Captions. Joins "count" consecutive cues (default 2) into one, its text re-wrapped to maxLines lines of maxCharsPerLine characters.
- captions.presets
Caption Presets. The caption presets: built in, then the project's, each with its style.
- captions.remove
Delete Caption Track. Deletes a caption track of the sequence.
- captions.removeCue
Delete Caption. Deletes a cue of a caption track.
- captions.removePreset
Delete Caption Preset. Deletes one of the project's caption presets.
- captions.savePreset
Save Caption Preset. Saves a named caption style in the project: a caption track's style, with "style" fields applied on top (or the default look).
- captions.setStyle
Caption Style. Changes how a caption track looks: font, size (fraction of the frame height), fill, outline, shadow, background box, placement (bottom, top or a custom position), alignment, width, karaoke highlight, speaker names.
- captions.setTrack
Caption Track Settings. Renames a caption track, sets its language or shows/hides it.
- captions.shiftCues
Shift Captions. Moves the cues that start in [from, to) (default: all of them) by a signed delta, e.g. to resync captions.
- captions.splitCue
Split Caption. Cuts a cue in two at a time inside it.
- captions.updateCue
Edit Caption. Changes a cue's text, start, end or speaker (null clears the speaker).
- captions.updateFromTranscript
Update Captions from Transcript. Rewrites the text of a caption track's cues from the transcript words under them (after transcript corrections), keeping their timing and style; cues with no words under them stay as they are.