Command · Captions from Transcript
captions.generateFromTranscript
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.
- v1
- Capability EditSequence
- Tool
captions_generateFromTranscript
Request
{
"command": "captions.generateFromTranscript",
"params": {
"gap": 0.08,
"maxCharsPerLine": 32,
"preset": "Podcast"
}
}Parameters
breakOnSpeakerChangeboolean- A new speaker starts a new cue. Default true.
gapnumber (0.0..2.0)- Least time between two cues in seconds. Default 0.
languagestring- Track language (default: the transcript's).
maxCharsPerLineinteger (8..200)- Default 42.
maxDurationnumber (1.0..60.0)- Longest cue in seconds. Default 7.
maxLinesinteger (1..4)- Default 2.
maxPausenumber (0.05..30.0)- A longer pause between words starts a new cue. Default 1.
minDurationnumber (0.0..10.0)- Shortest cue in seconds. Default 0.7.
namestring- Track name. Default "Captions".
presetstring- A caption preset for its style (captions.presets).
replaceinteger (1..)- Caption track id to replace.
sequenceinteger (1..)- Sequence id; only needed when the project has several.
speakersboolean- Name speakers on the cues. Default true.
splitOnPunctuationboolean- A sentence end closes a cue once it is half full. Default true.
Discussion
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. Thai and other unspaced scripts break between words, and where the host provides line-break rules also inside them. Each cue gets the speaker of most of its words (diarization labels without a speaker get one). "replace" regenerates a caption track and keeps its style.
Run it with wabcut-cli cmd <project> --json, from an MCP client as captions_generateFromTranscript, 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.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.translate
Translate Captions. 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).
- 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.