Taxonomy Icon

IoT

Create a smart coffee maker

Get the code

Summary

Build an IoT application, like a smart coffee maker, with multiple services to send commands and receive responses through a conversation using Watson services, IFTTT, and Slack.

Description

In this code pattern, you use Speech to Text, Text to Speech, and Watson IoT Platform services to take audio and translate it to text commands and send those commands to a registered device, which is a device that is connected to the IoT Platform and is ready to send topics and receive commands. I used a NodeMCU v2 device (ESP8266 WiFi-based microcomputer) with MQTT communication. Additionally, this code pattern implements IFTTT to Slack messaging, passing the commands sent to the device to a Slack channel.

Flow

Architecture diagram for creating a custom voice experience

  1. Node-RED app records audio requests from the microphone.
  2. The Watson Speech to Text service converts your speech to text.
  3. Watson IoT Platform receives the text and assigns it to a device.
  4. Watson IoT Platform passes the request to IFTTT to trigger an event to display the task performed message on Slack.
  5. Watson IoT Platform service node sends the response to the Text to Speech service.
  6. Watson IoT Platform sends the callback responses to the Text to Speech service.
  7. The Watson Text to Speech service converts the text to speech, and sends it to the audio player which reads aloud the response. Watson IoT Platform also sends the command to the coffee pot, by way of the NodeMCU device using MQTT.

Instructions

Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README file.