This Instructable will show you how to build your own Amazon Echo from a Raspberry Pi, some off-the-shelf components, and a laser cut frame. The Echo Pi has almost all the functionality of the real Amazon Echo.
The Amazon Echo is a nifty virtual assistant/home automation product that you have almost certainly heard of before if you've accessed the Internet at least once in the last year. The device is controlled by voice commands given to the artificial personality, Alexa. Amazon Echo lets you do many things from converting measurements in the kitchen, to playing music, to controlling a range of smart home products.
In this Instructable we will be building our very own Amazon Echo using a Raspberry Pi and a couple other off-the-shelf components, plus laser-cut pieces. Our Raspberry Pi-Powered Amazon Echo, that I call the EchoPi, will have almost all the functionality of the real thing, plus building your own Echo will give you a platform for experimenting with the service by giving you an easily modifiable version of the Echo.
The only feature available in the real Amazon Echo that is not available on the EchoPi is Amazon Music. According to the Amazon Developer page, "Amazon Music is currently limited to Alexa-enabled products approved for commercial distribution and use."
Let's get started.
TL;DR Most of the Amazon Echo's capabilities are powered by Amazon's cloud services, not housed in the Echo itself. The hardware inside the Echo is relatively simple, meaning that we will be able to build our own Echo with a Raspberry Pi.
Before starting to build our EchoPi, it will be useful to understand how the real Echo actually works. The hardware inside the device itself is actually fairly simple. All of the technology that powers the platform's higher level functions, all of its voice recognition features, Internet connectivity features, and the engine that finds answers to your queries, is housed in Amazon's data centers.
Inside the Amazon Echo device itself there are basically two main systems. First there is the audio system responsible for playing back answers to questions you ask Alexa or playing music. There is nothing groundbreaking about the Echo's audio system, it is just a loudspeaker and an amplifier, a technology that has existed for about 100 years.
The second system is more sophisticated. In order to listen to your commands, the Echo has an omni-directional microphone system consisting of six microphones arranged around the perimeter of the Echo's circular housing, plus a seventh microphone in the center.
Image from the iFixit Amazon Echo Teardown
The Amazon Echo has a system that constantly listens for you to say the word "Alexa," which arms the system for receiving your command or query. Unlike some alarmists would have you believe, this does not mean the Echo records every single thing happening in your home, it just listens specifically for the word "Alexa."
After capturing the audio of your command the Echo uses its Internet connection to send a file of the audio clip to Amazon's Alexa Voice Service (AVS). The AVS does all the really difficult work of deciphering your voice command into a query a computer can understand. The AVS then finds the resources needed to answer your question, the other cloud services needed to execute a command, or the file to play a song. Once the AVS processes your command it sends a simple audio file back to the Amazon Echo. The Echo then simply plays the audio file.
So, basically, the hardware inside the Amazon Echo itself is nothing too advanced. It is certainly innovative, especially the omni-directional speaker system and the launch phrase detection system, but it is not as if a super computer voice recognition system lives inside each Amazon Echo. There is an extremely advanced computer system behind the platform, but it is housed in some Amazon data center somewhere. The Echo works by communicating with this more advanced system, called the Alexa Voice Service. A Raspberry Pi has more than enough computing power to replace the motherboard inside an Amazon Echo and give us a platform for building our own Echo device.