66
submitted 1 year ago by linucs@lemmy.ml to c/linux@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] gyrfalcon@beehaw.org 8 points 1 year ago

If you're willing to roll your own a bit, whisper.cpp is pretty good

[-] duncesplayed@lemmy.one 16 points 1 year ago* (last edited 1 year ago)

I'm a university professor who uses whisper.cpp for video lecture transcriptions, so I'll chime in here. The thing about whisper.cpp compared to pretty well every other option is that whisper.cpp is really really really really really good. Like the accuracy is almost always completely 100% (and that's just on the 'medium' model. The 'large' model is probably even better)

There is only one problem with whisper that I've found, which is that if you use a low quantization model (I believe I'm using a 4-bit quantization model), whisper can get stuck into a "no punctuation mode" if that happens your transcription will suddenly start to look like this there will be no punctuation or capitalization it's quite annoying once it gets into this mode it can't get back out again

The way to get around that is to segment your audio. I use ffmpeg's silence detector to segment the audio whenever there's a >1 second pause in the audio (so that I don't accidentally segment in the middle of a sentence or the middle of a word). Break the audio up into roughly 10-minute segments and you should not see no-punctuation mode happening.

The other nice thing about Whisper is it'll tag fragments with confidence level and starting- and ending times. I use the confidence level so that I can quickly jump through low-confidence transcription points to see if it made a mistake (though it usually doesn't). I use the starting- and ending times to automatically generate an .srt subtitle file. Then I use ffmpeg to bake in hardsubs for the students.

So far it's been working very smoothly and quickly. Even on my crappy old GTX1060, I can get subtitles at about 2-3x real time. And with almost no manual intervention.

load more comments (1 replies)
this post was submitted on 06 Oct 2023
66 points (98.5% liked)

Linux

48376 readers
1559 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS