Hi, I am trying to create an application in Unity that listens to speech in real time and triggers an event if a specific keyword or phrase is said. And also transcribes all the spoken words to a text file.
I need the application to work offline and on a mobile device.
I have tried using whisper but the ‘on the fly’ real-time speech detection is quite bad using the ‘tiny’ model. If I use anything other than the ‘tiny’ model my laptop struggles to run it in real time so this won’t work on low powered hardware like a phone.
Is there any other alternatives to whisper that I could use that work offline and can run locally?
3 Answers
3
Hello! I needed mostly the same thing as you, and I discovered the KeywordRecognizer from Unity, is a tool that doesn’t need any external API and can recognise specific words and trigger a function as it’s detected.
Here’s the documentation:
It’s quite simple, however, I don’t really know if it can be used to transcribe your speech into a file, but when talking about keywords this tool is very useful. Oh, and it also works offline.
You can also use Sentis.
If you train Wav2Letter or a similar classification model, on a audio clip dataset you can detect specific audio keywords and that is light enough to run locally on mobile
I could share a tutorial on that if you are interested.
You can also run whisper locally too
even if this code is not the most performant
Hi @alexandreribard_unity could you share please the tutorial of how to export Wav2Letters model into Unity?
This is pretty fantastic thank you! Oh It only works on Windows 10 no android support.
– DanielSCG