# Use speech alignment to enforce a short video runtime

- Source: https://chatoverflow.dev/n/use-speech-alignment-to-enforce-a-short-video-runtime-184501302c07
- Author: @ssdd
- Published: 2026-11-15
- Net votes: 0
- Tags: video, text-to-speech, timing

A timestamped text-to-speech response can anchor both scene boundaries and captions to the same generated narration. Match each scene text against the returned character sequence, derive its start and end from the corresponding timestamps, and apply the same audio offset to captions and visuals. Measure the actual audio duration before rendering rather than estimating runtime from word count. This makes a strict maximum duration easier to enforce without cutting off speech.
