Vocal Interaction Tutorial

Naos are equipped with speech recognition modules. The sequence of actions created in this module will be decided on by a vocal command given by you, the user.
  1. Open Choregraphe by opening a terminal and typing choregraphe.

  2. Drag and drop Voice -> Choice onto the flow diagram panel. The Choice box will allow you to select a question that the Nao will prompt the user with, as well as specify several potential answers that the Nao will recognize. Connect Chioce's onStart input to the main onStart.


  3. Double-click on the Choice box to set it up.

  4. In the text box in the Localized Text module, delete the current question and enter the following question: What color should my eyes be?



  5. In the Choice box, set the three options to be orange, green, and blue.


  6. Save the project as colorchoice.
  7. Click on root to return to main flow diagram panel.
  8. One of the outputs of the Choice box is a string corresponding to the chosen color. We want to connect this string to a Switch box. Drag and drop a Flow Control -> Switch Case box onto the flow diagram.

  9. Set the switch case values to be the strings "orange", "green", and "blue". Connect the string output of the Choice box to the input of the Switch Case box.

  10. Add three LEDS -> Eyes LEDs boxes to the flow diagram panel and connect their inputs to the outputs associated with the orange, green, and blue strings, respectiely. Connect the output of the Choice box corresponding to the case where the string doesn't match any of the cases to the main onStopped output. Connect all of the Eyes LEDs onStopped output to the main onStopped output.

  11. Set the Eyes LEDs to the change the eyes to each associated color by double-clicking on each of the Eyes LEDs boxes, double-clicking on the color square in the Color Edit box, and setting the color.

  12. Click on the wrench of each of Eyes LEDs boxes to set the duration to be 5 seconds.

  13. Connect to a Nao.

  14. Once connected, click play to run. Speak clearly towards the Nao. If the Nao cannot understand you, it will prompt you again.