No transcription tool? I synced captions to a voiceover using only the pauses. How would you do it?

by•

I make short animated reels where each script line appears as a caption while a voice reads it. My setup had no speech-to-text, so I couldn't get a timestamp for each line. What I did instead was use the silences.

ffmpeg's silencedetect filter (noise threshold -38 dB, minimum silence 0.25 seconds) prints where every silence starts and ends. A script written as one line per breath gives one pause between lines, so each silence_end is the start of the next line. I saved those times to a small file, and the renderer shows each caption for its window.

The mouth is simpler. A script measures how loud the voice is in each 30 fps video frame and saves the values. The character's mouth opens by that amount, so it moves with the voice.

One fix I had to make: my first voice take ran about 45 seconds, which is too long for a reel. I shortened the pauses and sped the audio up 5%, which brought it to about 41 seconds. The times are re-detected after that, never reused from the old file.

The weak spots. Pauses inside a sentence also show up as silences, so I check each detected segment's length against its word count. In my last reel, one boundary between two lines was too close to call, and I estimated it. The loudness mouth is not lip sync, and it only reads well on short clips. A fixed -38 dB threshold also works for one clean voice, but a noisy file would need a different value.

If you have audio and a script but no transcript, do you sync from silences like this, force-align with a tool, or type the timings by hand?

6 views

Add a comment

Replies

Be the first to reply

Have a question or a thought to share? Add a comment above to start the conversation.