OpenSubs: I built a subtitle generator that runs Whisper in the browser, so the video never gets uploaded
a month ago by opensubs to c/opensource
I work on OpenSubs, a free, open source (AGPL-3.0) subtitle tool that runs entirely in the browser tab.
You drop in a video file, and Whisper transcribes it on your own machine, using transformers.js with WebGPU where available and WebAssembly otherwise. The model (40–250 MB) downloads once and is cached. There is no upload endpoint in the product, so the video has nowhere to go.
After that you can:
A few things I learned building it:
Honest limits: it only takes video files, not audio-only files. Cue timings can't be edited yet. Builds are release candidates. Everything that runs locally is free with no account; the only paid part is optional cloud translation on our backend (US$5 for 1000 credits), and you can bring your own Claude / OpenAI / DeepL key instead.
Site: https://opensubs.app/ Code: https://github.com/open-subs/opensubs
Feedback welcome, especially on languages where the transcription goes wrong.
Sometimes if I hit the voice typing on my phone, which I'm pretty sure is whisper, and then don't say anything, it just comes out with nonsense.
Just did this and also got...
Thanks for watching!
Nice, another blindly generated app by Claude Code. 37 commits and already announcing it tells it all.
Which is absolutely legit. I only criticize the people releasing a “production ready” product, which is nothing but a PoC and then also claim that it is AGPL-3, while abandoning it after 2 months. This hurts the open source community imho.
This hurts the open source community imho.
Nah. At worst the open source community is indifferent. If someone can pick up where this left off then it benefits the community.
All "generated code" hurts open source, actually.
while abandoning it after 2 months. This hurts the open source community imho.
I dont expect them to maintain it for eternity. The problem is people expect too much from the authors as if it's the author's duty to fix bugs and add features. And tbh, this attitude hurts open source community more than anything. Ffs, the code is open source, do what you like. The author is not responsible for everything. Be grateful that the code is open-source.
I am not talking about the many projects, where you have a single developer just enjoying making software, while providing it to the open source community. I have zero expectations to those projects.
I am talking about people promoting their open source products. Making a fancy website. Act professionally. All this behavior causes people to have expectations. So why invest time into promoting it in the first place? There is literally no need to do this, expect for the owner to attract more and more people.
Don’t promise a sky scraper if you can only maintain a bungalow.
It sounds like a pretty cool project, thanks for sharing! As a browser-based project designed to run offline, you might want to consider shipping it as an electron app.
There is a desktop app already — macOS, Windows and Linux. It's Tauri rather than Electron, so it's a much smaller download, and it's meant for the cases a page is bad at: long files and batches, with large-v3-turbo instead of the small models the browser is limited to.
Worth knowing before you try it: the builds are unsigned, and burning subtitles into the picture needs an ffmpeg built with the ass filter (Homebrew's plain ffmpeg formula doesn't have it; the Windows build offers to install one for you).
Did whisper improve since last year?
Last time I tried to generate subtitles for a German TV show, the subtitles were more inacurrate than what I would have written down (German is my third language and I struggle to understand anything that isn’t voiceovered) and timing was so bad I didn’t even bother to generate subtitles for the second episode.
No but other models have. parakeet-unified is currently the best small model.
You can tell OP vibe coded the whole thing from their outdated model choice.
You can tell OP vibe coded the whole thing from their outdated model choice.
I hate this landscape we're in now. I'm always suspicious of whether something was created by a thieving computer program or a real human. Just like I'm always suspicious of crazy videos these days being AI or not. Neither can I watch an ad anymore without suspicion. It's so much extra mental overhead.
I'm tired, boss.
You can also just click the repository and see that Claude is a contributor which usually gives it away.
My point is more so that OP didn't even put in the effort to ask claude to look up the current best ASR model to use but instead one-shotted the thing
That depends much more on the model size than on the year. In the browser we're limited to small models — tiny (English only), base and small, 40 to 250 MB — and on a German TV show those are exactly where Whisper gets shaky.
The desktop app and the CLI can run large-v3-turbo (1.6 GB, 99 languages), which is a different experience on non-English speech. If your last try was a small model, that's the part worth changing before judging it.
Why not just use the whisper plugin for Bazarr?
I just made an open-shoe! This is the first FOSS shoe ever. Everything is free but if you want both shoes, you'll need a subscription. OpenShoe is right foot only. Any foot, any size, durable and incredibly versatile. Left shoe only available in sizes M5, M7, M11.5, and M16.
What’s the max file size?
I’ve been looking for the fan edit of marvels Infinity saga.
It’s about 50 hours long divided into many many files ranging from 3-10 gb each. Would it be able to handle this? Or what’s the best way to split them up
Honest answer: for files that size, use the desktop app rather than the web page. The browser build holds the decoded audio in memory, so multi-GB files are where it starts to struggle, and I haven't tested anything close to 10 GB in a tab.
The desktop app (macOS, Windows, Linux) exists for exactly this — long files, no browser in the way — and it can use large-v3-turbo (1.6 GB, 99 languages) instead of the small models the web version is limited to. Two things worth knowing before you download: the builds are unsigned, and burning subtitles into the picture needs an ffmpeg built with the ass filter.
Files are processed one at a time, so a 50-hour fan edit split across many files is a batch job rather than one run.
I'm a lazy reader so don't know if this is implemented but it would be cool if it could be done live with the current audio out of the system. I know this was done for streamers etc using OBS/localvocal but it's a pain to get working in my experience - having to fiddle around with OBS filter settings.
Not system-wide audio, but per-tab: there's a browser extension that puts subtitles over whatever is playing in the tab, transcribed as it plays. It's in the Chrome and Firefox stores now, free and AGPL like the rest. It won't replace OBS + localvocal for anything outside the browser, but there's no filter chain to set up — install it, open the tab, hit Start.
Two things to set expectations. It runs behind the audio: it transcribes in windows, and on integrated graphics that's tens of seconds, so the overlay prints how far behind it currently is rather than pretending it's live. And it only works where the page itself plays the media — a site embedding someone else's player in an iframe, or a file served without CORS headers, can't be captured at all, and it tells you so instead of sitting there.
On permissions: it asks for no site access when you install it. When you hit Start it requests that one site, and nothing else.
Whisper is not an llm, just because it is trained on big datasets does not make it an LLM. Copyright infringement still happened during the training.
Which software are we talking about? Unfortunately no one links to it, so I will guess. Whisper: website | source is an Ai model, specifically powered by OpenAi.
Whisper is not an llm, just because it is trained on big datasets does not make it an LLM.
The training dataset consists of 680,000 hours of labeled audio-transcript pairs sourced from the internet using semi-supervised learning.
Brother, I don't think you know what a large language model is if you think it being trained on a human lifespan's worth of audio transcripts isn't enough.
Its job is NLP. It is an LLM, if not as general-use as something like ChatGPT.
LLM is a subset of NLP. All LLMs are NLP but not all NLP are LLMs. To be more precise, LLM is a method of achieving NLP while NLP is the goal. Whisper is just a specialised speech-to-text engine. It doesn't have the text reasoning engine that is the core of LLMs. Yes, it has a dataset to inform it's encoder and decoder, but that doesn't make it an LLM. If you strip out the encoder, then you're getting closer.
If you strip out the encoder, then you're getting closer.
That's flat-out not true. BERTs, for example, are LLMs and are encoder-only, just like GPTs are decoder-only. Whisper is trained on a large corpus of text and does NLP tasks. That's all it is to be an LLM.
A transformer model being encoder-only, encoder-decoder, or decoder-only has fuck-all to do with whether it's an LLM. In fact, it being a transformer model at all isn't required for it to be an LLM.
oh no, how awful of them to release the code back into the wild for free with a copyleft license. truly an awful thing to do.
In the browser
Never gets uploaded
What are you talking about?
The browser runs a lot of stuff that doesn't get passed on to the servers you connect to. In this case it can run a local whisper model locally and pass your video stream through it, rather than pass it through some server online.
@virku Then what's the point? You can just download the model and run it locally without using this service...
It's not a "service" but a program that runs locally.
Downloading the model and running it locally is essentially what it does. If you do it by yourself then you'd have to write your own scripts. At which point, you might as well share those scripts with the community putting them in Github, and maybe including them in a web extension to integrate with the browser and/or in a static website that locally runs it via WASM... precisely what this project is doing...
This is how loads of things run these days. Browser handles the UI because it's way easier to get working on all kinds of different user machines. I don't like it personally but that's why.
It's how pretty much any server dashboard runs.
If i understood this right...
Instead of uploading a file you just download the model. The sound then gets transcribed as usual without the service accessing the file.
@beyoublahaj So audio gets uploaded?
oh nah I reread the post and edited my comment. I misunderstood too ^^`
@beyoublahaj So what's the point of this service if you can download the model yourself and use it without this website?..
@lemmy.ml
All about open source! Feel free to ask questions, and share news, and interesting stuff!
Community icon from opensource.org, but we are not affiliated with them.
go to feed...
@lemmy.ml
All about open source! Feel free to ask questions, and share news, and interesting stuff!
Community icon from opensource.org, but we are not affiliated with them.
go to feed...
I've had Whisper ask me to donate to anime fansubbing groups. I wonder what it was trained on?
save