Categories

Amazon Echo

I built a voice-controlled Amazon Echo using a Raspberry Pi

While my Raspberry Pi 3 Model B made a decent home theatre PC,[1] I wanted to test the capabilities of the hardware by turning the credit card-sized computer into a home assistant. Luckily, Amazon has made its Alexa Voice Service available to developers to use on multiple devices. Alexa is an always-on virtual assistant that allows you to access services and applications using voice commands preceded by the word “Alexa”.

Using Alexa on a Raspberry Pi was previously quite impractical, as the platform did not support the wake word. The wake word is now supported by the device, making the Pi an ideal candidate for a home assistant – due to its open hardware platform and low price.

Hardware and Pricing

The hardware I needed to create my Alexa-powered assistant was a standard Raspberry Pi 3 Model B board, power supply, microSD card, a speaker, and a microphone. The code to connect a Raspberry Pi to the Alexa Voice Service has several quirks and requires a specific hardware configuration.

You will need a speaker which connects to the board using a 3.5mm audio connector, and a USB microphone that connects via one of the USB ports. The pricing for the hardware required for a “cheap” build is:

  • Raspberry Pi 3 Model B Starter Kit – R940[2]
  • Speaker with 3.5mm audio connection – R210[3]
  • USB microphone – R250[4]

The prices are guidelines for new hardware for the build, and I saved a fair amount by using a battery-powered speaker and a USB microphone which I own. Assembling the hardware is straightforward and consists of connecting the microphone and speaker to the Raspberry Pi, along with any peripherals required to set up the device.

alexa pi 2

Set-up

Setting up the device requires a fair amount of software installation and compatibility checks, beginning with the installation of the Raspbian Jessie OS. After I installed the OS and booted up the system, I connected a wireless keyboard and mouse, and an HDMI monitor to the Pi. Before installing anything Alexa-related, I made sure to update my Pi’s operating system and drivers – as these can cause issues if not updated.

It is recommended that a simple USB microphone is used for this project, as devices requiring drivers to function may not be supported by the Pi. Alexa Pi header

Installation

I installed Alexa Voice Services on my Pi by following the Alexa AVS Sample App guide on Github[5]. This involved the downloading of many files and a fairly long wait for the pre-built installer to set up the applications.

While the software was installing, I set up an Amazon developer account[6] in order to connect my home-made Alexa device to Amazon’s voice services. This step is necessary for the device to function and provides you with security information you will need for setting up Alexa on your Pi. Finally, after following the installation guide and linking my Amazon account, I was ready to start Alexa.

Firing up the virtual assistant is not as elegant as simply pressing a button, and it requires you to open three terminal windows and sign in to your Amazon account. However, thanks to the newly-introduced wake word support, I was able to disconnect the keyboard and monitor from the Pi once I had it set up. alexa pi 1

Features

I expected the Raspberry Pi Alexa to be extremely limited in terms of functionality, but I was presently surprised by the support for Alexa skills and built-in functionality.

Right off the bat, my Pi was able to set an alarm and timer, stream online radio, search the Internet, find restaurants and other places near me, and answer questions about its functionality. As I expanded its functionality by enabling skills, it impressed me even more – allowing me to order an Uber from my home in Johannesburg by saying: “Alexa, call me an Uber”. In my brief time experimenting with my home-made assistant, I found that although it could not natively play my music library on Google Play (it works with Amazon Music), it could play music from paired Bluetooth devices and read me the top news headlines on commands.

For most purposes, my Raspberry Pi with Alexa functioned similarly to an Amazon Echo and could theoretically control other smart devices on my home network – if I had any.

Alexa isn’t the only option for DIY home assistants, though, with open source program Jasper[7] a popular choice for Raspberry Pi users.

Now read: I built a home theatre PC using a Raspberry Pi[8]

References

  1. ^ home theatre PC, (mybroadband.co.za)
  2. ^ R940 (www.pishop.co.za)
  3. ^ R210 (www.takealot.com)
  4. ^ R250 (www.takealot.com)
  5. ^ Github (github.com)
  6. ^ Amazon developer account (developer.amazon.com)
  7. ^ Jasper (github.com)
  8. ^ I built a home theatre PC using a Raspberry Pi (mybroadband.co.za)

Amazon’s Echo will wake you up with Jeremy Clarkson alarm

A new alarm on the Amazon Echo will wake you up with an alarm featuring Jeremy Clarkson, Richard Hammond, and James May. A new feature on the Amazon Echo will wake you up with an alarm featuring Jeremy Clarkson, Richard Hammond, and James May. Amazon is currently promoting its highly-anticipated The Grand Tour series, featuring the former Top Gear presenters.

The Verge reported that Amazon’s “voice assistant is doing its bit to promote the new series to Top Gear fans with a new alarm on the Amazon Echo and Echo Dot”. The new alarm from The Grand Tour presenters is available within the Alexa app. The video below, published by The Verge, shows the new The Grand Tour alarm in action.

Amazon’s Alexa will now wake you up with an alarm from @JeremyClarkson @MrJamesMay and @RichardHammond pic.twitter.com/6zfsQFXWM8[1][2][3][4]

— Tom Warren (@tomwarren) November 11, 2016[5]

Now read: Jeremy Clarkson’s The Grand Tour – watch the epic first trailer[6]

References

  1. ^ @JeremyClarkson (twitter.com)
  2. ^ @MrJamesMay (twitter.com)
  3. ^ @RichardHammond (twitter.com)
  4. ^ pic.twitter.com/6zfsQFXWM8 (t.co)
  5. ^ November 11, 2016 (twitter.com)
  6. ^ Jeremy Clarkson’s The Grand Tour – watch the epic first trailer (mybroadband.co.za)