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.
1. Create Watson Speech to Text service in Bluemix
2. Note down the credentials which will be used in Node-RED configuration
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.
A simple microphone node records audio directly from the web browser
- Click the button to start recording
- Click the button again to stop recording
The recorded audio is stored in the nodes msg.payload object
Supported output formats: WAV
Controlling the Humanoid Robot with voice Commands using Node-Red
The flow goes here:
- Clicking the Microphone input node button toggles recording.
- Record the voice command using USB Microphone(Pickup, Dance, Sleep, Wakeup etc)
- Microphone node sends a buffer of the recorded audio as the msg.payload object to Watson Speech to Text Node.
- Then Watson converts the buffer into text.
- Set msg.payload node moves the string output of speech to text to the msg.payloadobject as required by the subsequent nodes.
- Node-Red matches each converted text command and sends events to Watson IoT Platform
- The Command is received by Raspberry Pi which will send signals to Robot using connected IR Dongle
- Robot performs requested command
Here is the Node-RED Flow:
Watch Robosapien Humanoid Robot in Action
Conclusion and Next steps
In this Part 2 recipe, we learned the following,
- How to set up IBM Watson Speech to Text Service in Bluemix
- How to install extra NPM Node-red modules for audio recording using USB Microphone
- 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.