Posted by amrrs 10 hours ago
Just to clarify - This started as just an experiment to see if we can use the fact that text and audio share a vector space in Embedding Gemma 2 to convert audio to text. Had to hack around a few things, but, it worked. Speed was just a side benefit. Was not aiming for it.
The accuracy is good, but not in the range of cloud models, but decent enough for everyday use, and this is just a couple of days work. The WER can improve a lot with more training on varied data. Will try that next.
I will opensource the whole thing soon. Might need a few days though. Also, releasing the TTS version for this soon.
Happy to answer any questions you have.
Thank you!
uv tool install mlx-audio
mlx_audio.stt.generate \
--model ibm-granite/granite-speech-5.0-470m-turboctc \
--audio.wav \
--output-path transcript
(Until now I've been using mlx-community/parakeet-tdt-0.6b-v3)People aren't paying enough attention to how great EmbeddingGemma 2 and Gemma 4 are.
Basic ML is probably even cheaper. But LLMs might have higher accuracy. “Uhh one I think” = 1
Say classify recorded interviews into viable/not viable candidate?
"One cool trick" I like for running those kinds of models very quickly on macOS is converting them to CoreML so they run in the Neural Engine.
I had amazing success with Spleeter, Demucs, MVSEP-MDX23-music-separation, DeepFilterNet, Whisper, Hunyuan3D for 3D mesh generation. Plus a lot of others for both work and leisure.
I also convert the code to Swift without dependencies, but that's a personal preference.
The runtime on some of them went sometimes from 60s to 10s. And since it's just Swift, I can just give them to non-technical co-workers and they don't have to setup a whole Python environment.
If you don't wanna do this by hand, this is something that existing LLM models are good at. Even Luna can do it without much fuss.
Pre-pandemic it seemed like even the very best in class auto-transcription features were just unusably bad. I guess that was like 7 years years ago though.
I'll test theirs too if I get around to it
Here's a sample CLI wrapping the apple model and providing a simple benchmark: https://github.com/llimllib/transcribe
update: doesn't seem like they provide their model and I don't feel like trying to dig it out of their app bundle, so I'm not going to test this one
They supposedly improved it on later Apple Intelligence enabled devices, but I don’t have one.
I use their on-device translation in my apps. Works pretty well. ChatGPT's context-aware translation is better, but it's not on-device.
On my bench, parakeet-tdt-0.6b-v2 is 2x slower
I wonder if you're using different Apple models when you go through that app? I don't know
You stated WER of 5% - against which benchmark?
Whistle [1] for example is a 16MB STT model but WER varies between 4-26% depending on the benchmark.
"EmbeddingGemma 2 is made by Google DeepMind and released under Apache 2.0. This is an independent project, not affiliated with or endorsed by Google."