Step 11: Error Message

Goal:


The ELSE statement will only happen if you say a phrase that the phone isn’t programmed to recognize.

This can be either because you were not clear enough when you said it or because you simply didn’t say any of the phrases you programmed into the app.

Steps:

  1. From TextToSpeech, place a call TextToSpeech.Speak message block into the ELSE portion of our IF/THEN block.
  2. From Text, attach an empty text box block to the call TextToSpeech.Speak message block.
  3. You can write any message you want here, but I’m simply going to write “I’m sorry I didn’t understand you.”

Code: