JohnEisenheim
JohnEisenheim

Reputation: 87

Android - Get Google Voice installed languages

I'm developing an android application that uses SpeechRecognition (Speech-to-text feature). It is possible to detect installed languages in settings through an intent?

Thanks you all!

Upvotes: 2

Views: 270

Answers (1)

JohnEisenheim
JohnEisenheim

Reputation: 87

Ok, maybe I've found a workaround. In the Intent init, I've added

intent.putExtra(RecognizerIntent.EXTRA_PREFER_OFFLINE,true);

So, when I try to start SpeechRecognizer without the locale language downloaded, app returns

SpeechRecognizer.ERROR_NETWORK

error. In this way, I'm able to recognize whether a language is downloaded or not.

Upvotes: 1

Related Questions