title: Android Speech Recognition with Limited Vocabulary
body: <p>I am new to android programming. I would like to include speech recognition in my app to allow the user to pick among limited choices, likely a handful of letters or numbers. For example, "A", "X", "2" etc. It seems that informing the speech recognition engine of the limited choices in advance should help improve accuracy  (high accuracy will be crucial).</p>
  
  <p>I have googled extensively, searched these forums and read the android.speech documentation here:
  <a href="https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_LANGUAGE" rel="nofollow noreferrer">https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_LANGUAGE</a></p>
  
  <p>I would prefer to use the Google Speech Recognition API if possible. </p>
  
  <p>I realize that an alternative might be to use <a href="http://cmusphinx.sourceforge.net/2011/05/building-pocketsphinx-on-android/" rel="nofollow noreferrer">PocketSphinx</a> as suggested <a href="https://stackoverflow.com/questions/10307373/android-offline-voice-recognition-with-simple-commands-vocabulary">here</a>, however my attempts to build this have not been successful and I would prefer to use the google API.</p>
  
  <p>The best I can envision at this point is to set LANGUAGE_MODEL_FREE_FORM and then manually code something to handle the recognition output along the lines of what was suggested <a href="https://stackoverflow.com/questions/12449242/recognize-letters-said-by-a-person-using-java">here</a>. It seems there should be a way to limit the vocabulary, but I cannot find one with my limited understanding of the documentation. Yet surely I cannot be the first to implement voice navigation of what amounts to menu items. Right??</p>
  
  <p>Any help and/or advice will be greatly appreciated!</p>