hamza_q_
Joined 1 year ago
Joined 1 year ago
The aim is for it to be a high-performance implementation. Can currently transcribe 1 hour of audio in 20 seconds on an M5 Mac.
A fully custom, dependancy-free implementation with raw WebGPU compute shaders and SIMD WebAssembly audio frontend.
1 hour of audio transcribed in 20 seconds (Apple M5, Google Chrome 151.0.7922.72).
Check out the source and use in your own projects!
https://github.com/narcotic-sh/parakeet.wgsl
https://www.npmjs.com/package/parakeet.wgsl
This might be the first instance of _fast_ & accurate transcription running locally in the browser. So long as your device has a GPU and can run a WebGPU-capable browser, parakeet.wgsl will run on it.
And as WebGPU transpiles to practically any GPU, this also opens up the path to getting parakeet.wgsl running offline / outside of the browser, via Dawn or wgpu, so that fast, accurate transcription can be brought to offline programs, with GPU acceleration and support for nearly all hardware/devices.
Interested in what you guys think about about this project.
And lastly, I'm looking for job. If you like my work and think I'd be a good fit for your team, I'd love to chat. I've done some other work too that you can find at https://hamzaq.com
Cheers, everyone. Enjoy fast, cross-platform GPU-accelerated local transcription!
I explained how the full system works here (someone emailed me and asked): https://pastebin.com/raw/r2YUEkK5
Making the ad-finding cheap enough such that I could make it free turned out to be harder than expected. The main issue you run into is dynamic, location-targeted ads. So I came up with a novel technique that uses Shazam-style audio fingerprints for accurate matching, instead of their normal use case, which is identification. This technique is what allows the ad finding to be very cheap, allowing me to make it free.
The SponsorBlock model would actually not work for podcasts, due to dynamic ads. I.e. the location and content of the ads in episodes these days varies by download location. You need the media to be static, like YouTube, for SponsorBlock model to work. Therefore, using an LLM to find the ads + the fingerprints matching in combination is an efficient technique.
Android has def been the most requested thing thus far haha. It'll be a decent undertaking due to me having written the app fully in Swift, i.e. it'll be a complete rewrite. I'll also need to replace FluidAudio with some good, fast Android equivalent.
The goal of making this app was to create something impressive so that I could get a job. Haven't gotten a job yet, but if and when I do, then I'll have time & resources to think about doing an Android version. Currently a bit stressed and occupied from the job search lol.
https://github.com/FluidInference/FluidAudio/pull/799
With the updated PR code, ran a test comparing transcribing (using Parakeet V3) a 1 hr stereo 44.1 kHz mp3 vs the same audio in 16 kHz mono wav format. The result was about 21.3% slower with the mp3 vs the wav, i.e. that's the overhead of decoding + resampling.
Currently the decoding + resampling is done up front. If it was done in a pipelined fashion with the inference, that overhead can be eliminated. This is what I did in a recent app I made:
https://apps.apple.com/us/app/drea-podcast-ad-blocker/id6759...
It uses FluidAudio as well, but I forked it and replaced the audio decoding code to (a) use mpg123 instead of the native Apple API and (b) do audio decoding and inference in a pipelined fashion. These two changes effectively eliminated the overhead. mpg123 is quite a bit faster than the native Apple API at mp3 decoding (has some very optimized arm64 assembly routines), and the pipelining ensures that the inference is never starved by the mp3 decoding.
Contributing this pipelined setup to FluidAudio would be good.
https://github.com/FluidInference/FluidAudio/pull/507
That means one hour of audio transcribed in 11.25 and 12.75 seconds.
The Inscribe post doesn't give a speed factor for SpeechAnalyzer. However, this Argmax blog post reports 70:
https://www.argmaxinc.com/blog/apple-and-argmax
Based on that, FluidAudio is ~4.6x and ~4.0x faster.
Thanks!