Got my Raspberry Pi delivered yesterday and already have it set up to control my VeraLite using voice commands. To begin with, if you want to do this, make sure you have at least an 8gb SD card, 4gb will not be enough to copy Noob to and install Raspbian.
Let me preface this with a couple of items. If you’re running your Pi through HDMI directly to a TV, you’re probably fine. I started with the HDMI connected to a receiver sending video to projector and having the receiver handle the audio and the text to speech from voicecommand would only kick in after the 4th or 5th word. If you’re running things through a receiver, then I highly recommend plugging computer speakers into the analog port and using that. In order to do so, you’ll need to run the following command:
sudo amixer cset numid=3 1
The “1” tells it headphone/analog, or you can set it to 0 for “auto” or 2 for “hdmi”.
Once you have your Pi and SD card, go here: Raspberry Pi OS – Raspberry Pi
You can try downloading the Noobs image, but when I did something was corrupt, once I grabbed it from the torrent, everything was fine.
Format your SD card according to the instructions from that page and then copy the unzipped Noobs image to it.
Put the SD card into your Pi and start it up. It will ask you what OS’s you want to install. For this tutorial all you need is Raspbian.
It will take a while, but when done you’ll be presented with options. I don’t remember what they all are, but I do remember telling it to boot up into Terminal and not GUI. You’ll want Terminal in order to install the next items.
Your Pi will reboot again I believe after setting the options.
Once done, follow the instructions here Steves Computer Vision Blog: Installing and Updating PiAUISuite and voicecommand to install voicecommand.
There are numerous things you can install during his setup, do what you want.
The very last item to install is voicecommand, you definitely want that.
After installing it, it will ask if you want to set it up, you probably want to say yes, or you can just run “voicecommand -s” from terminal at any time after the fact.
If you get an error during install/setup about libboost.regex, you’ll need to run the following command: “sudo apt-get install libboost-regex1.49-dev”
Once everything’s set up, you’ll need to edit the config file to recognize and run commands by running “voicecommand -e”
You can set up all kinds of things here, but if you’re just worried about VeraLite, you need to check out this page: http://wiki.micasaverde.com/index.php/Luup_Requests#user_data
There’s a lot of info here that should be easy enough to figure out, but these are the http requests you want to send.
So now that you’re in the the edit config, here are the important parts. You set up a command on the left side by telling it what you want to say. Say you want to set up a scene for “watch tv” to turn off all of the lights. Your line in the edit config would be “watch tv==”. “watch tv” is the voice command you want it to listen for. After the “==” you would type in “curl” with a space after followed by the http url that will run your command from http://wiki.micasaverde.com/index.php/Luup_Requests#user_data.
One thing to remember is to wrap your http string in double quotes. For some reason the ampersands in the string cause it to break. So you line in the config would be: curl “http://…”