How to I properly parameterize the speech recognizer so that it can more easily recognize the words that the user will probably say?
As far as I can tell there is no way.
I believe this site is wrong: http://www.4feets.com/2009/04/speech-recognition-in-android-sdk-15/
According to the site, this code:
ArrayList< String > potentialResults = new ArrayList< String >();
potentialResults.add("yellow");
potentialResults.add("green");
potentialResults.add("blue");
potentialResults.add("red");
// Create Intent
Intent intent = new Intent("android.speech.action.RECOGNIZE_SPEECH");
Will give a hint to the recognizer that you might say those words. However, it appears to do absolutely nothing. It also conflicts with the google documentation which says:
"An ArrayList of the potential results when performing ACTION_RECOGNIZE_SPEECH. Only present when RESULT_OK is returned." This hints that the array is a return value NOT an input.
To test this out try adding:
ArrayList< String > potentialResults = new ArrayList< String >();
potentialResults.add("cumin");
and try to get the speech recognizer to recognize it. You will find it very difficult.
Does any one have insight into how to properly control the speech recognizer?