Overview

Skill Level: Intermediate

Part 1 of this recipe covered details of how to control the Humanoid Robot by sending Wake up, Dance, Pickup and Sleep commands using Node-RED. Part 2 shows how to control the Humanoid Robot with voice commands using IBM Watson Speech to Text service.

Ingredients

Need folloiwng additional items for Part 2

  1. USB  Microphone
  2. Extra NPM Node-red modules for audio recording using Microphone

It is recommended to complete the recipe of Part 1 before you proceed with Part 2.

Step-by-step

  1. Set up IBM Watson Speech to Text Service in Bluemix

    The IBM¬ģ Speech to Text service provides an API that lets you add speech transcription capabilities to your applications. To transcribe the human voice accurately, the service leverages machine intelligence to combine information about grammar and language structure with knowledge of the composition of the audio signal. The service continuously returns and retroactively updates the transcription as more speech is heard.

    This service converts the human voice into the written word. It can be used anywhere there is a need to bridge the gap between the spoken word and their written form, including voice control of embedded systems, transcription of meetings and conference calls, and dictation of email and notes. This easy-to-use service uses machine intelligence to combine information about grammar and language structure with knowledge of the composition of the audio signal to generate an accurate transcription.

    Steps:

    1. Create Watson Speech to Text service in Bluemix

    2. Note down the credentials which will be used in Node-RED configuration

     

    stt

    stt-cred

  2. Install NPM Node-red modules for audio recording using USB Microphone

    Install following additional modules on your Node-Red instance. Then use Microphone input node to capture Robot commands from your USB Microphone.

    "node-red-contrib-browser-utils":"0.x",
    "node-red-contrib-media-utils":"0.x"

     

    A simple microphone node records audio directly from the web browser

    Usage:

    1. Click the button to start recording
    2. Click the button again to stop recording

    The recorded audio is stored in the nodes msg.payload object

    Supported output formats: WAV

    Screen-Shot-2017-02-14-at-10.19.20-AM

  3. Controlling the Humanoid Robot with voice Commands using Node-Red

    robo_flow_aprt2

    The flow goes here:

    1. Clicking the Microphone input node button toggles recording.
    2. Record the voice command using USB Microphone(Pickup, Dance, Sleep, Wakeup etc)
    3. Microphone node sends a buffer of the recorded audio as the msg.payload object to Watson Speech to Text Node.
    4. Then Watson converts the buffer into text.
    5. Set msg.payload node moves the string output of speech to text to the msg.payloadobject as required by the subsequent nodes.
    6. Node-Red matches each converted text command and sends events to Watson IoT Platform
    7. The Command is received by Raspberry Pi which will send signals to Robot using connected IR Dongle
    8. Robot performs requested command

    Here is the Node-RED Flow:

    Voila_Capture-2017-02-14_10-31-44_AM

  4. Watch Robosapien Humanoid Robot in Action

  5. Conclusion and Next steps

    In this Part 2 recipe, we learned the following,

    1. How to set up IBM Watson Speech to Text Service in Bluemix
    2. How to install extra NPM Node-red modules for audio recording using USB Microphone
    3. How to send voice commands from Node-Red and Control the Robosapien Humanoid Robot 
       
      As a next step, you could try with various voice commands(e.g: Turn Left/Right, Go Backward/Forward, Right/Left Strike, Whistle, Strike etc..) and enjoy playing with your humanoid Robot.

1 comment on"Control the Humanoid Robot with voice commands using IBM Watson Speech to Text service (Part 2)"

  1. JawwadParacha March 25, 2017

    Can you please share Node-RED file for your recipe.

Join The Discussion