Exercise - Execute commands using Azure speech recognition

Completed

In this module, you'll add the ability to execute commands using Azure speech recognition, which allows you to make actions happen based on the word or phrase you define.

  1. In the Hierarchy window, select the Lunarcom object, then in the Inspector window, use the Add Component button to add the Lunarcom Wake Word Recognizer (Script) component to the Lunarcom object and configure it as follows:

    • In the Wake Word field, enter a suitable phrase; for example: Activate terminal.
    • In the Dismiss Word field, enter a suitable phrase; for example: Dismiss terminal.

    Screenshot of Unity editor with Lunarcom Wake Word Recognizer script component highlighted.

  2. If you enter Game mode (as in the previous exercise) the terminal panel is enabled by default, but you can now disable it by saying the Dismiss Word, Dismiss terminal:

    Screenshot of Unity editor in play mode with speech recognizer feature in use

  3. You can enable the terminal panel again by saying the Wake Word, Activate terminal:

    Screenshot of Unity editor in play mode with active terminal.

    Caution

    The application needs to connect to Azure, so make sure your computer/device is connected to the internet.