I'm currently using the below code to acquire speech on my phone:
Intent intent = new Intent( RecognizerIntent.ACTION_RECOGNIZE_SPEECH );
intent.putExtra( RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault() );
intent.putExtra( RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM );
intent.putExtra( RecognizerIntent.EXTRA_PROMPT, "Say something..." );
try
{
startActivityForResult( intent, RESULT_SPEECH );
}
This works really well except I'd like to be able to get speech using my own screens. The above code displays a default Android activity of some sort. What I would like to do is display my own activity with a list of search results and be able to spell out the letters until I match what I want.
For example:
How can acquire speech without using a default/system activity so that I can do this on my own screens?
Found out how. This post was an excellent step in the right direction.
I just needed to implement RecognitionListener
.