Testing Android’s On-Device Speech Recognition With Hindi-English Code-Switching
My mother describes how she feels in Hindi, with English health words dropped into the middle of the sentence. "BP high hai." "Fever lag raha hai." "Dizzy ho raha hai." Nobody in my family thinks of this as code-switching. It's just how we talk.
I'm building an Android app so she can log how she feels by voice instead of typing. Her village connection is unreliable, so the app has to work offline, and because this is health data, I didn't want her audio going to a server if I could avoid it. That means on-device speech recognition, and that's where I found out how many things can quietly go wrong between "the API exists" and "my mother is understood".
This is what I learned, including the parts that didn't work.
The setup
Android has SpeechRecognizer.createOnDeviceSpeechRecognizer() (API 31+), which runs recognition locally with no network. I use it live:...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE