brainsteam.co.uk/brainsteam/content/posts/legacy/2015-11-28-watson-home-auto...

2.6 KiB
Raw Blame History

author categories date post_meta tags title type url
James null 2015-11-28 10:57:14+00:00
date
automation
iot
raspberry-pi
watson
work
Home automation with Raspberry Pi and Watson posts /2015/11/28/watson-home-automation/

Ive recently been playing with trying to build a Watson powered home automation system using my Raspberry Pi and some other electronic bits that I have on hand.

There are already a lot of people doing work in this space. One of the most successful projects being JASPER which uses speech to text and an always on background listening microphone to talk to you and carry out actions when you ask it things in natural language like “Whats the weather going to be like tomorrow?” and “What is the meaning of life?” Jasper works using a library called Sphinx developed by Carnegie Mellon University to do speech recognition. However the models arent great especially if you have a british accent.

Jasper also allows you to use other speech to text libraries and services too such as the Google Speech service and the AT&T speech service. However there is no currently available code for using the Watson speech to text API until now.

The below code snippet can be added to your stt.py file in your jasper project.

Then you need to create a Watson speech-to-text instance in bluemix add the following to your JASPER configuration:

stt_engine: watson
stt_passive_engine: sphinx
watson-stt:
 username: "<Text-to-speech-credentials-username>"
 password: "<Text-to-speech-credentials-password>"

This configuration will use the local Sphinx engine to listen out for “JASPER” or whatever you choose to call your companion (which it is actually pretty good at) and then send off 10-15s of audio to Watson STT to be analysed more accurately once the trigger word has been detected. Heres a video of the system in action: