Generate SRT subtitles and the voiceover together

Most subtitle workflows run backwards: record the audio, then transcribe it and hope the timings land. If the narration has not been recorded yet, you can skip all of that.

Write the script, generate it, and you get the MP3 and an SRT whose timings came straight from the speech engine - accurate to the individual word, because nothing had to be guessed.

Edit the line to hear anything you like.

Why these timings are different

There are three ways to time a subtitle, and they are not equally good.

ApproachWhat you get
Estimated from textCues spaced by word count and an assumed reading speed. Drifts within a few sentences and needs hand-correcting throughout.
Transcribed from audioA speech model listens back and guesses the boundaries. Good, but it inherits every mistake the recogniser makes and costs a second processing pass.
Reported by the synthesizerThe engine says exactly when it started each word, because it is the thing saying them. Nothing is inferred. This is what happens here.

The practical difference shows up on proper nouns, numbers and technical terms - the words a transcriber is most likely to get wrong, and the ones a viewer most needs to read correctly.

How cues are built

RuleValue
Maximum line lengthAbout 42 characters
Maximum lines per cueTwo
Maximum time on screenSix seconds
Minimum time on screen1.2 seconds, stretched if there is room
Forced breakAt the end of a sentence, or after a silence of 0.7 seconds or more
Speaker labelsAdded as a prefix on dialogue renders, omitted on single-voice ones

A workflow that saves a whole editing pass

  • Write the narration first. Before you cut anything, put the script in the editor and add pauses where you want the visuals to breathe.
  • Generate once. You get the MP3, the SRT, the VTT and a plain transcript together.
  • Cut to the audio. The narration is already timed, so the edit follows it rather than the other way round.
  • Drop the SRT on last. No re-syncing, because the captions and the audio came out of the same render.

Questions

Where do the timings come from?
From the speech engine itself. As it synthesizes, it reports the exact moment each word begins - so the timings are not estimated from word counts and not recovered by transcribing the audio afterwards. They are the real boundaries, which is why they line up.
Can I get subtitles for a video I already have?
Not directly here, and it is worth being clear about the difference. This generates captions for narration it creates. If you already have a recording, transcribe it on the audio-to-text page - that runs on your own device - and use the transcript as your starting point.
SRT or VTT?
SRT for video editors, YouTube and most desktop players. WebVTT for HTML5 <track> elements and the web generally. Both come out of every render, so you do not have to decide in advance.
How are lines broken?
Standard broadcast readability rules: at most two lines of about 42 characters, at most six seconds on screen, and a break wherever a sentence ends or the speaker pauses for more than about seven-tenths of a second. Very short cues are held on screen a little longer so they do not flash past.
Do pronunciation fixes change the subtitles?
No, and this is deliberate. If you respell a name so the voice says it correctly, the subtitle still shows the real spelling. The viewer reads the word as written and hears it said properly.
What about multi-speaker scripts?
Dialogue renders prefix each cue with the speaker's name, so a two-voice script produces captions that attribute each line.

Related