Git Product home page Git Product logo

sphero-bluemix-speech's Introduction

sphero-bluemix-speech

This project is a simple sample that shows how to use the Watson Speech to Text service in IBM Bluemix to steer a Sphero ball. The web application in this project is an extension to the projects sphero-bluemix-android and sphero-bluemix-ios which contain the mobile apps that communicate with the ball.

The Watson Speech to Text Node.js sample has been extended to send the spoken words as text via the MQTT protocol to the IBM Internet of Things service. A Node-RED flow is used to receive the spoken words and to trigger the specific flows.

alt text

Authors: Mark VanderWiele, Bryan Boyd

Setup of the Node-RED Flow

In order to send commands to the mobile app a Node-RED flow in IBM Bluemix is used in combination with the IBM Internet of Things Foundation.

Log in to Bluemix and create a new application, e.g. MySphero, based on the Internet of Things Foundation Starter. Additionally add the Internet of Things service to it.

In the next step you have to register your own device. Open the dashboard of the Internet of Things service and navigate to 'Add Device'. As device type choose 'Watson' and an unique device id - screenshot. As result you'll get an org id and password - screenshot.

In order to import the flow open your newly created Bluemix application and open the Node-RED editor, e.g. http://mysphero.mybluemix.net/red, and choose import from clipboard. You find the flow in the sub-directory 'noderedflow'.

If you want to actually steer a Sphero ball you have to also set up the Android or iOS app. Alternatively you can modify the flow to do whatever you like to do based on the received spoken words.

Setup of the Node.js Application

  1. Create a Bluemix Account. Sign up in Bluemix, or use an existing account.

  2. Download and install the Cloud-foundry CLI tool

  3. Download the application and change to that directory. Run "npm install".

  4. Modify the file demo.js. Replace the text in the screenshot with your org id, device id and auth-token that you received when you registered the device. Note that in a real production application you should not put the password in the JavaScript file.

  5. Edit the manifest.yml file and change the application name and service name to something unique. The name you use will determinate your application url initially, e.g. sphero-watson-nik.mybluemix.net.

  6. Connect to Bluemix in the command line tool.

$ cf api https://api.ng.bluemix.net
$ cf login -u <your user ID>
  1. Create the Speech to Text service in Bluemix.
$ cf create-service speech_to_text free speech-to-text-service-nik
  1. Push it live!
$ cf push

These steps created the application in Bluemix including the service.

sphero-bluemix-speech's People

Contributors

jsloyer avatar nheidloff avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.