Captions

15 tools: transcribe, enable_captions, set_caption_source, set_caption_style…

transcribe

Transcribe · Changes the project

Transcribe a media item's speech with word-level timings so cut-by-text and captions can work. Runs on-device: Parakeet (fast) for 25 European languages when the browser has WebGPU, Whisper otherwise — model says which ran. Pass a mediaId from get_project_digest / list_media. Returns the detected lang, the model used and the transcript as timed lines ([start–end] text, source seconds) — read them to pick cuts and to proofread captions before fixing words with fix_transcript_word. language (ISO-639-1, e.g. 'ru') forces the spoken language when detection is wrong; force: true re-transcribes media that already has a transcript.

InputType
mediaIdstringRequired
languagestring
forceboolean

enable_captions

Enable captions · Changes the project

Turn burned-in captions on or off for the project.

InputType
onbooleanRequired

set_caption_source

Set caption source · Changes the project

Choose which layer's audio drives the captions: 'all', 'main', 'ov:<lane>' or 'tr:<trackId>'.

InputType
sourcestringRequired

set_caption_style

Set caption style · Changes the project

Style the captions. Three ways to call it. (1) A full PRESET — 'tiktok-bold' (karaoke highlight, the social default), 'highlight-pop' (word box), 'clean' (minimal one-word), 'dynamic' (bouncy) — sets look AND animation. (2) An ANIMATION id alone, which changes only how the words arrive and leaves the creator's font/colours/plate untouched: 'word-by-word' (karaoke recolour), 'highlight-box' (box behind the spoken word, with ring), 'highlight-active' (box behind only the current word), 'highlight-trail' (box accumulates under every word spoken so far), 'word-pop' (each word springs in), 'word-fade' (each word fades in), 'word-slide-up' (each word rises into place), 'typewriter' (letter by letter), 'word-blur-in' (each word resolves out of blur), 'word-shake' (lands hard, rattles still), 'one-word' (one word at a time, clean), 'one-word-bounce' (one word, pop + slide), 'line-by-line' (whole line, no per-word motion). (3) A raw style patch (incl. letterSpacing — % of the font size, default 0 — and lineHeight — % of the font size, default 102). See get_guide('captions').

InputType
presetstring
patchobject

set_caption_segment

Set caption segment · Changes the project

Override one caption line's text and/or timing directly (without touching the transcript) — the escape hatch for a single wrong displayed caption. mediaId+segIndex identify the segment; seg = { start, end, text, words? }. Prefer fix_transcript_word for wording (it corrects everywhere); use this for a one-off override.

InputType
mediaIdstringRequired
segIndexnumberRequired
segobjectRequired

translate_captions

Translate captions · Changes the project

Show the captions TRANSLATED into another language (in-browser opus-mt; word timings stay the spoken ones). lang ∈ en | es | de | fr | it | pt | ru | nl | zh, or null to go back to the spoken language. Translation builds in the background per media file — the original shows until each track lands, then swaps automatically. Needs transcripts (enable captions / transcribe first).

InputType
langstring | nullRequired

align_captions

Align captions · Changes the project

Re-align word timings to the actual audio energy — the fix when karaoke highlights or text-cuts land a beat off (Whisper's timestamps drift). Snaps every word to its real onset/offset by listening to the waveform. Pass a mediaId to target one clip, or omit to align every transcribed clip on the timeline. Run it after transcribe if timings look loose, before cutting by text.

InputType
mediaIdstring

fix_transcript_word

Fix transcript word · Changes the project

Correct a word ASR mis-heard. Locate by source start/end (from digest.transcript.byMedia) and pass the right text. A line-sized window is OK when you also pass from (the current wrong word) — without it, the tool picks the overlapping word most similar to text, or refuses with candidates if several compete. The fix flows to captions AND text-based cuts.

InputType
mediaIdstringRequired
startnumberRequired
endnumberRequired
textstringRequired
fromstring

reclean_transcript

Reclean transcript · Changes the project

Re-run transcript cleanup (decoder loops, artifacts, split suffixes, timing clamps, caption line grouping) over the words already recognised — seconds, no re-transcription, fix_transcript_word edits survive. Use instead of transcribe force:true when the words are right but the lines look messy. Returns the new lines.

InputType
mediaIdstringRequired

set_caption_position

Set caption position · Changes the project

Move, scale or rotate the whole caption block: x / y (centre offset, −0.5..0.5, y negative = up), scale (1 = default size), rotation (degrees). Keep captions clear of platform UI (get_guide('formats')).

InputType
xnumber
ynumber
scalenumber
rotationnumber

hide_caption_line

Hide caption line · Changes the project

Hide (hidden:true) or bring back (hidden:false) one spoken caption line without touching the transcript or the cut. Each line in get_project_digest transcript.timeline carries its clipId + segIndex; hidden lines are listed under captions.hiddenLines.

InputType
clipIdstringRequired
segIndexinteger ≥ 0Required
hiddenbooleanRequired

add_caption_line

Add caption line · Changes the project

Add a caption line that nobody speaks (a label, a translation note, a sound cue) from start to end in timeline seconds. It takes the captions' style. Returns its id for update_caption_line / remove_caption_line.

InputType
startnumber ≥ 0Required
endnumberRequired
textstringRequired

update_caption_line

Update caption line · Changes the project

Change an added caption line's text and/or timing (ids in get_project_digest captions.extras). Spoken lines are corrected with fix_transcript_word or set_caption_segment instead.

InputType
idstringRequired
startnumber
endnumber
textstring

remove_caption_line

Remove caption line · Changes or removes

Delete an added caption line by id (get_project_digest captions.extras).

InputType
idstringRequired

reset_caption_edits

Reset caption edits · Changes or removes

Throw away every manual caption edit — text overrides, hidden lines and added lines — so the captions follow the transcript again. One undo step.