captions.generate
Generate subtitle files (SRT/ASS) or animated caption HTML from transcription segments or an SRT file, with styles for word highlighting, pop-in, or background boxes.
Instructions
Write captions from transcription segments or an SRT file: subtitle files (srt/ass) or a HyperFrames composition HTML for animated captions (karaoke word highlight, word-pop, background box).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| srt | No | Path to an input .srt file (used as-is, lines and timings preserved) | |
| style | No | Caption style: "plain", "karaoke" (word highlight), "pop" (scale-in), "box" (background plate). Default "plain". | |
| width | No | Frame width for ass/hyperframes output (default 1080) | |
| format | Yes | Output format | |
| height | No | Frame height for ass/hyperframes output (default 1920) | |
| output | Yes | Path of the file to write | |
| duration | No | Composition duration in seconds (default: end of the last cue) | |
| maxLines | No | Transcript lines per caption chunk (default 2) | |
| transcript | No | Transcription segments (inline), or a path to a JSON file holding an array of segments or {segments:[…]} | |
| maxCharsPerLine | No | Transcript wrapping limit per line (default 42) |