2.5 KiB

Captions

<captions /> inside a scene transcribes that scene's audio into a caption node: a styled, timed transcript, produced on import. To caption an already-open scene, insert one with dapi node insert.

<captions preset="spotlight" colors={["#FF0055"]} />

Transcription is asynchronous and non-blocking: the caption node is inserted at commit and its transcript attaches once ready. Because it reads the scene's audio, it runs after any generated assets in the scene have landed and after audio sync has resolved; captioning a generated voice/audio track transcribes the finished audio at its final placement. The scene must contain an unmuted audio or video source; otherwise the caption node is left empty.

Transcripts are cached: every transcript asset records a fingerprint of the scene's audible mix (source content, placement, source offset, playback rate, gain). When a scene's fingerprint matches an existing transcript, that asset is reused instead of transcribing again; re-mounting a project with unchanged audio consumes no credits. Any change to the scene's audio invalidates the fingerprint.

Props

Prop Type Default Meaning
preset see below "classic" Caption style preset.
colors string[] preset defaults Fills the preset's color slots in order; any CSS color, alpha ignored. Ignored by presets without slots.

Presets

preset selects the caption style: the same presets as the editor's caption inspector. Some presets expose color slots, filled in order by the colors prop; a missing or omitted entry falls back to the slot's default.

Preset Style Color slots (defaults)
"classic" (default) Centered lowercase text with a soft drop shadow, a few words at a time. none
"cascade" Light text in the lower left; words appear progressively as they are spoken. none
"spotlight" Bold italic centered line; the spoken word lights up in the highlight color. 1: highlight (#24D5FF)
"whisper" Small, wide, understated line shown in ~2 s phrases. none
"paper" Centered two-line block; the line being spoken is emphasized with a heavier weight. none
"guinea" Uppercase display text; the spoken word enlarges and cycles through the three colors. 3: #F55353, #FEB139, #F6F54D
"stark" Heavy uppercase text blended into the footage with a difference blend. none