Amazon Alexa on Raspberry Pi

Loading

I’m doing a number of projects with the Raspberry Pi.  The latest? I just got Amazon Alexa running on my Raspberry Pi and respond to the wake word “Alexa”.  This is all base on the Alexa AVS Sample App, provided by Amazon.

Ready to setup it up?

So what do you need to make your own inexpensive Alexa?  Basically 3 things:

 

  1. Raspberry Pi 3.
  2. USB 2.0 Mini Microphone ( I ordered a small USB mini microphone from Amazon for $6.99, extremely compact)
  3. External Speaker (I had an old mini speaker that were just collecting dust around our house, and it works like a charm now)

I’m actually surprised that the Raspberry Pi 3 did not come with its own build in microphone and speaker.  It seems that it is something that is quite handy instead of requiring external devices.  You can easily find very small USB microphone for this project, but speaker tend to be a bit more bulky and messy.

Amazon Alexa-avs-sample-app is available in Github and here are the step-by-step installation instruction for the Raspberry Pi. If you are interested in other platform, this virtual Alexa can be setup on Linux, Mac, or Windows.

How does it work?

  • You must register a new Alexa device and create a security profile for it, you will be provided with a ProductID, ClientID, and ClientSecret.  This is what you use to identify and connect your Alexa to Amazon.
  • Clone the sample app from Github and run through the installation
  • Just start up all the necessary services, and your Alexa is in business.

Here are a few more views of my completed setup:

      

Time to play with it !

Now that you have everything setup.  Here is a video of my Alexa in action.  I did notice that some question will put Alexa into a loop.  The one that does it all the time is “Alexa, who is Alexa?”.   And to my surprise, I intuitively said “Alexa Stop!”, and it did.

This was quite a fun project and pretty simple to setup! The instruction were up-to-date and easy to follow. This sample app source code is available in Github, so next is to dive into the source code.  Have fun!

A follow up note: I tried to setup a bluetooth speaker for the Pi, but have not been successful so far.  I will do a bit more research and hopefully will provide an update in the future.