An example demonstration might help.
Here are two examples
and the SpeechRecognizer documentation SpeechRecognizer