Android Speechrecognizer When Do I Get Error_client When Starting The Voice Recognizer?
Solution 1:
So after a bit of pain I manage to solve my problem regarding my glass application.
First of all I found that SpeechRecognizer only works when my glasses are connected to the internet! Even so I still received from times to times ERROR 5. That was because I have a bad connectivity to the internet and from times to times my glass just disconnected from the internet without any notifications! I think this is an issue that must be solved for the next level of glasses. It just cannot disconnect from the internet without notifying you.
So one of the causes for ERROR_CLIENT(5) on Google Glass is: not having internet connection
Solution 2:
I found this link that is the source code for producing the errors.
There are 7 places where a search found "ERROR_CLIENT"
Here's the log statements right before the ERROR_CLIENT is sent to onError
- Log.e(TAG, "no selected voice recognition service");
- Log.e(TAG, "bind to recognition service failed");
- Log.e(TAG, "startListening() failed", e);
- Log.e(TAG, "stopListening() failed", e);
- Log.e(TAG, "cancel() failed", e);
- Log.e(TAG, "not connected to the recognition service");
Of course you can find more info at the above link, but this should give you the general reasons why you'd get ERROR_CLIENT
Solution 3:
The error happens also if the Google search application has no permissions to the microphone. In that case, the phone speech recognition service will be disabled and the ERROR_CLIENT error will be triggered for all apps (the above case was verified on a Samsung phone running Android 11)
Post a Comment for "Android Speechrecognizer When Do I Get Error_client When Starting The Voice Recognizer?"