Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.
Hovig Ohannessian edited this page Sep 12, 2018 · 8 revisions

Short Name

Watson-Alex, your audio assistant

Short Description

Use microphone to check the weather or have a conversation to assistant bot with Watson cognitive technologies

Offering Type

IoT Audio Cognitive

Introduction

The idea behind this project is to provide a hands-on fun workshop using Node-RED and Watson's cognitive solutions for audio conversations. Audio tends to have its own challenges and this step-by-step tutorial hopefully can help you enjoy coding and also target your goals through this experience.

This pattern uses the Car Dashboard Conversation workspace that comes by default when you create the Assistant (formerly Conversation) service. The reason is to avoid complications but you can always create or import your own conversation workspace, this might be a good idea to do a separate tutorial once this pattern gets consumed easily by developers.

After the completion of this tutorial, this application will record your talk and send it over to Watson's services to retrieve, based on your request, the weather data of a city.. Or can send commands and receive responses through a conversation, for example, to turn on lights or to play a music and many more.

Author

By Hovig Ohannessian

Code

Demo

Video

Overview

This tutorial will help you create an application that takes in an audio by recording your speech, then sends it over to convert this speech into a text. The Internet of Things platform receives this text and assigns it to an existing device, which in its turn, it sends it back to be checked whether it's a weather or commands requests.

After this decision, if it's a weather request then the text will be sent to the Weather Data Company to pull the answer and be sent to convert this payload to a speech and then to the audio player to read it loud from the laptop's speakers. If it was a command, the tone analyzer will take in this text to analyze it then send to the Assistant node to perform on this request by going through the conversation workspace and based on that will respond back: if it's something not designed to do, the conversation dialog will read out the error saying that it doesn't handle this request, or else, if it's the correct command then it will take the action and read out through the audio player that it performed the request.

You can always choose the voice, the language and the gender of the reader for this pattern's Assistant audio reader.

There's a lot more into it, coding is always fun specially with Node-RED. Looking at this project and seeing the amount of Watson services that are included, one can appreciate the existence of Node-RED.

Flow

  1. Audio will be recorded and be converted to a text through Speech-to-Text

  2. The text is sent to the Internet of Things Platform and be associated to a device

  3. The text will be received back from the IoT Platform and checked if there's a request of weather data (4a) or send commands through the conversation (4b1 and 4b2)

4a. Weather insights will send the weather data information of the mentioned city and then be sent as a text to the Text-to-Speech

OR

4b1. For commands received, it will be sent to the tone analyzer

4b2. From the tone analyzer, the text will continue to be processed in the assistant node and then sent to the Text-to-Speech

  1. The Text-to-Speech will receive the payload and will be sent to the audio player

  2. The audio player will read out loud the final text

Included components

Featured technologies

  • [Node-RED]
  • [Speech-To-Text]
  • [Text-To-Speech]
  • [Weather Insights]
  • [Tone Analyzer]
  • [Conversation]
  • [Internet of Things]

Blog

Links

Related links:

  1. Watson IoT Platform

  2. IBM Watson