Matching a script with a transcript 2025-01-09-01
- script
- record on my phone
- WhisperX transcript (with false starts and recognition errors)
My current implementation is totally unoptimized (n²) but it's fine for short videos.
Process:
- While there are transcript words to process
- Find the script line that has the minimum distance to the words left in the transcript. restart after oopses
- Script
- Transcript: min. distance between script phrase & transcript
- Restarting after oops: find script phrase with minimum distance
- Ex. script phrase: The Emacs text editor
- Transcript: The Emax text editor is a...
- Bar graph of distance decreasing, and then increasing again
- Minimum distance
- Oops?
- N: Use transcript words, or diff > threshold?
- Y: Add script words as comment
- N: Correct minor errors
- Y: Mark caption for skipping and look for the previous script line with minimum distance.
- N: Use transcript words, or diff > threshold?
Result:
- Untimed captions with comments
- Aeneas
- Timed captions for editing
This means I can edit a nicely-split, mostly-corrected file.