speech-captionslisted
Install: claude install-skill Nagellabs/libi
# Speech Captions (synced subtitles)
Use this when the user wants **subtitles synced to speech** — not decorative
text. Concern #1 is readability + sync, not animation.
Captions are **structured text overlays grouped into a caption track** — one
text overlay per cue, each with its own `startTime` / `duration`, all sharing a
`caption.groupId`. There is no JS draw function to author or validate and no
per-overlay code file. The fast path is `libi.generate_captions`, which builds
the whole track in one call from the file's existing word timings.
## Workflow
1. **Ensure a transcript exists.** Captions need word-level timings. Prefer the
`video-analysis` transcript for the spoken clip; if none exists, run the
`audio-analysis` skill first (local Whisper → word-level timing). With only
plain text available, sync will be approximate — state this to the user.
2. **Generate the caption track in ONE call:**
```
libi.generate_captions({
pieceId,
fileId, // the video/audio file whose transcript drives the cues
style: "cumulative", // a caption STYLE = reveal mode (see the style map below); default "cumulative"
anchor: "bottom-center" // 3×3 numpad placement; default bottom-center
})
```
It reads the per-word timings (`analysis_get_audio_chunks` under the hood),
builds readable, non-overlapping cues (lead + hold, width-budgeted, ≤2
lines), and creates one text overlay per cue sharing a per-file
`caption.group