Slides and code from the Speech to Text & IoT talk at TechCrunch's 2015 Disrupt SF Hackathon
See a video of the demo in action at https://www.youtube.com/watch?v=92CDJ2P0vAo
Setting up the demo
There are a few different moving parts in this demo:
- The device itself
- A Bluemix server instance to host Node-RED and connect the IBM IoT service
- A second Bluemix server instance to host the website and connect the Speech to Text service
I'm using a SparkFun ESP8266 Thing and the Arduino programing environment, but anything that can speak the MQTT protocol will do - the IBM Iot Foundation has "Recpipes" for connecting dozens of other devices.
To just see something working quickly, most of the settings can be null or "quickstart", and then enter the device's MAC address at https://quickstart.internetofthings.ibmcloud.com/#/
- The rest of the settings will come from the Node-RED bluemix instance.
On your Node-RED server's dashboard, find the new IoT service instance and click Show credentials - this will give you the Org ID to enter into the
mqtt_server variables in the Arduino sketch.
Now launch the IoT Foundation Service Dashboard, create a new device type
esp8266 (all other fields are optional), and then create one
password in the Arduino sketch to
"use-token-auth" and the token for the new device.
Upload your updated sketch to the device and the entry for your new device should start receiving status messages within a few seconds.
Finally, log into your node-red server (the link should be available in the Bluemix Dashboard),
import the data from
node-red/nodes.json (top-right hamburger menu),
and update the two IBM IoT nodes to have your devices MAC address for the ID (double-click to update).
Website and Speech to Text service
Edit the two
req = $.getJSON(... lines in
web/src/handlemicrophone.js to change to domain name to your Node-RED instance.
npm install npm build
(This step requires node.js.)
Next install the
cf command line tool, and then in the
web/ folder, run:
cf login cf push
This should create a new Bluemix server instance, bind a new Speech to Text instance, and publish the demo web app.
That's it! Try out your demo app and then build on it to create something even cooler!