Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check wether Speech Recognition is Available or not?

When I am initializing a Speech recognition app, I use this line of code:

Boolean b=SpeechRecognizer.isRecognitionAvailable(cContext);

Why does b always equals false on some devices (the emulator for example)? I understand what the function does from its description on Android documentation, but the documentation does not say what to do to make voice recognition available. Do I have to setup something else on my emulator? Do you know how to make Speech recognition always available?

like image 595
Josh Avatar asked Feb 27 '15 16:02

Josh


People also ask

How do I check Windows voice recognition?

Enter speech recognition in the search box, and then tap or click Windows Speech Recognition. Say "start listening," or tap or click the microphone button to start the listening mode. Open the app you want to use, or select the text box you want to dictate text into.

How do I install speech recognition?

The easiest way to install this is using pip install SpeechRecognition. Otherwise, download the source distribution from PyPI, and extract the archive. In the folder, run python setup.py install.


1 Answers

The problem IS real, so don't downvote before knowing. I solved it myself. The ultimate solution is to verify programmatically, that Google Search app is INSTALLED and ENABLED. If not, the best practice is to use intents to take the user to the Play Store for download/update, or to the App Info screen within settings to enable it. I did it, and it worked, if you need the code just let me know.

like image 129
Josh Avatar answered Oct 26 '22 18:10

Josh