Skip navigation
I turned Google Gemma EmbeddingGemma 2, an embedding model, into a speech-to-text model, and it…
0:00 / 0:26

I turned Google Gemma EmbeddingGemma 2, an embedding model, into a speech-to-text model, and it…

Shahir

@TslShahir1.4K followers

Visit on X
3,519 likesDownloadOriginal post

299,859 views

I turned Google Gemma EmbeddingGemma 2, an embedding model, into a speech-to-text model, and it turned out to be one of the fastest STT models you can run on device. On a base M3 MacBook Air it transcribes an hour of audio in about 13 seconds: 288× real time. The idea came in March with Gemini Embedding 2. It puts text, images, audio and video into one shared space, so a spoken word lands right next to the written word. If that's true, you should be able to read a transcript straight out of the embedding model. I couldnt tried it then, but last week EmbeddingGemma 2 came out as an open model, so I tried it.

59 Comments

Comments from the original post on X (Twitter)

  • Shahir's profile picture

    @TslShahir

    How it works: the model stays untouched. A small reader on top takes each slice of audio, finds the nearest of ~229,000 words in the model's own text space, and strings them together. It trained in under two hours on 8×H100, on openly licensed speech. On the same base M3 Air, it runs about twice as fast as IBM's Granite Speech TurboCTC. The table has more Macs and models. Its word error rate is about 5% right now, against 2–3% for leading STT models. The next iteration is to train a better word reader to improve that. Here is a free Mac app you can download to test it. Here's google's post

    233 likes

  • Shahir's profile picture

    @TslShahir

    You can download the free Mac app here to test it out -

    73 likes

  • Sagar's profile picture

    @Snorlxz

    @googlegemma Yo, what did I just saw! this is crazy fast and that too on m3 air

    10 likes

  • Shahir's profile picture

    @TslShahir

    @googlegemma Test on yours and let me know. It should be almost twice as fast

    3 likes

  • Bram van Es's profile picture

    @bramiozo

    @googlegemma Can imagine the word-error-rate is pretty high because for the unified embedding they will have used tuples of objects/nouns?

    10 likes

  • Shahir's profile picture

    @TslShahir

    @googlegemma About 5% WER on LibriSpeech test-clean: 5.18%. On the harder test-it's about 11.5-11.8%.

    18 likes

  • Bram van Es's profile picture

    @bramiozo

    @googlegemma Still very good! If you use e.g. SpaCy to extract the nouns and verbs, how does that compare in WER?

    2 likes

  • Shahir's profile picture

    @TslShahir

    @googlegemma Embedding gemma 2 can already identify parts of the speech. I have tested it. on WER, it is about 5 on Librispeech easy set.

  • Ivan Fioravanti's profile picture

    @ivanfioravanti

    @googlegemma Amazing, simply amazing! Well done!

    9 likes

  • Shahir's profile picture

    @TslShahir

    @googlegemma Thank you :D Long-time fan. So, super honored

    2 likes

  • Monty's profile picture

    @mont_py

    @googlegemma is this sorcery open source? :D

    6 likes

  • Shahir's profile picture

    @TslShahir

    @googlegemma Soon :D

    5 likes

  • Imran Qureshi's profile picture

    @explorations_iq

    @googlegemma Awesome, I could imagine we can do all sorts of information transformation if we have a set to choose from using embedding Gemma. Although I expect the WR to be pretty high here?

    4 likes

  • Shahir's profile picture

    @TslShahir

    @googlegemma the WER is currently around 5 for librispeech. But, this is easily finetunable for any domain. I tried it for earnings call recordings. WER moved almost 1.5 hours with a few hours of audio. The reader is just an 87 m model so finetuning happens on the reader.

    7 likes

  • Allison Smith's profile picture

    @HoborgAcolyte

    @explorations_iq @googlegemma "WER moved almost 1.5 hours" What were you actually trying to say here? The WER dropped to 1.5?

  • Shahir's profile picture

    @TslShahir

    @explorations_iq @googlegemma I missed a with there :D WER moved 1.5% with finetuning on a few hours of audio for a specific domain.

  • RITAV DAS's profile picture

    @dasritav

    @googlegemma Looks great, how good is the accuracy

    2 likes

  • Shahir's profile picture

    @TslShahir

    @googlegemma About 5% WER on LibriSpeech test-clean: 5.18%. On the harder test-it's about 11.5-11.8%.

    2 likes

  • Atif Saleem's profile picture

    @malikatifsaleem

    @googlegemma Resource usage?

    2 likes

  • Shahir's profile picture

    @TslShahir

    Resource use, measured in the app: an hour-long file peaks at about 860-900 MB of memory on a base 8 GB M3 MacBook Air (about 740 MB on an M1 MacBook Pro), and a 3-minute clip at about 630 MB. The models are a 715 MB download at 6-bit. The reading runs on the Neural Engine, with the GPU doing the word lookup.

    6 likes