Recognize user's speech

Speech Recognition allows the Android Smartphone to recognize user's speech and returns the most likely result.

Download to your computer and then upload to your App Inventor account

  1. Run the listen program to observe how the speech recognition program works
  2. Follow the video to create your own Speech Recognition program using App Inventor


3 components are used

  1. Basic->Label
  2. Basic->Button
  3. Other stuff->SpeechRecognizer (This is a non visible component, that is it will not appear on the screen)

Block Editor

5 blocks are used

  1. My Blocks->Button1->Button1.Click
  2. My Blocks->SpeechRecognizer1->SpeechRecognizer1.GetText
  3. My Blocks->SpeechRecognizer1->SpeechRecognizer1.AfterGettingText (name result block is automatically added)
  4. My Blocks->SpeechRecognizer1->SpeechRecognizer1.Result
  5. My Blocks->Label1->set Label1.Text

After SpeechRecognizer1.GetText is called, there is a time lapse before the text of the recognized speech is returned. In order to allow the phone to do other tasks (multi-tasking) instead of just waiting for the result, a SpeechRecognizer1.AfterGettingText event is provided which will activate when the returned text is available.