I'm using the android.speech.SpeechRecognizer on Android. In some cases, isRecognitionAvailable return false, so I can't recognize the speech. Is there no way to enable android.speech.SpeechRecognizer on Phone? Or is there similar service ?
isRecognitionAvailable return false on android
2k views Asked by hobbydev AtThere are 4 answers
Is there no way to enable android.speech.SpeechRecognizer on Phone? Or is there similar service ?
No, SpeechRecognizer
is a SYSTEM service. If it is not available, then there is not such service on the device. Here is the quote from documentation.
Checks whether a speech recognition service is available on the system.
If you really want speech recognition, you can record the mic input and process the raw input yourself.
I know that it has passed too much time but this may help somebody.
I run into a very strange issue. I knew that speech recognizer once worked in my Android 5.1.1 phone. However, isRecognitionAvailable started to return false. However, createSpeechRecognizer was creating the object (although it didnt start listening). It was strange because according to documentation:
isRecognitionAvailable:
Checks whether a speech recognition service is available on the system. If this method returns false, createSpeechRecognizer(Context) will fail.
I ended up going into PlayStore and looking for "Ok google" and I found that Google LLC was disabled. I enabled it and Speech Recognizer started to work again.
Hope this helps anyone
If SpeechRecognizer.isRecognitionAvailable(this) returns false your device has no SpeechRecognizer support. Is simple.
Check documentation