Slightly off-topic, but can anybody recommend a local model/tool that fixes timestamps of existing srt subtitles? That should be easier than generating them from scratch.
When I last looked for this a few years ago, I only found a really primitive one that did a linear transformation of all timestamps in the video, and none to correct each line individually.
edit: Claude recommended alass. Any experiences with that one, or better options?
https://github.com/sc0ty/subsync
It can sync from audio in the video or from another srt. Target srt can be in different language than reference.
EDIT: Two forks, but I haven't tried them as I'm still using the original as it still works well even though it has been archived.
I just asked Claude or codex to do it using uv/uvx and it did it effortlessly and perfectly, I didn't even look at what package(s) it used.
> When I last looked for this a few years ago, I only found a really primitive one that did a linear transformation of all timestamps in the video, and none to correct each line individually.
Not an answer to your current query, but my first published rust crate shortly after the language hit 1.0 was a tool to both calculate and correct linear drift, long before the era of LLMs or quality audio recognition. It might be fun to tackle this again with the new tech we now have at hand!
Srt-resync: https://github.com/mqudsi/srtresync
I don't plan to release it as it part of an overall "media health" tool I built but you should be able to vibe this pretty easily. I have mine using Whisper to check episodes at intervals throughout to compare against this subtitles and then shift them as needed.
One thing to watch for, make sure it never tries to 2 subtitles at the same time or they will stack in a weird way. It's easy to avoid that but my first pass on a few episodes screwed up the subtitles.
Also, you almost certainly want to extract the subtitles for this work, or at least that's what I did. A combo of pulling out the subtitles in the video file and using OpenSubtitles (VIP) to clean up my media.
https://www.bazarr.media/ is what most people use when running the *arr stack
I whipped something up for a friend a few months ago, it's not just fixing timestamps like you've asked, it's processing the whole audio but it does a good job (uses parakeet) and is quite quick.
Download links and a bit of write up here - https://news.ycombinator.com/item?id=48528779#48535207
Honestly you can probably build your own quite easily. I put together a plex player for firetv that does on device subtitling for whatever you're watching. I got sick of having to find subtitles.
It works really well and it's just a single static binary file (ffmpeg is needed on your $PATH), easier to use than ffsubsync which needs gcc to compile random stuff, and that stopped working randomly
Something I made a long time back for myself. https://sras.me/subfixer
If you want really accurate timestamps, the current state of the art is to ask claude to implement forced alignment using a CTC transcription model. It uses the logprobs of a character based transcription model to find the best matching overlap. I've used this technique to generate sync files for epub/audiobooks and it's really good even when the data is dirty.
This method aligns the transcript of a 60 hour book in 20 minutes on my GPU using Parakeet CTC 0.6B which is english only, but there's similarly sized models in other languages, the models don't need to be that good at transcribing to generate good alignments.