60

PiExa- ->Raspberry Pi + Amazon Alexa: A step-by-step guide to build your own...

 5 years ago
source link: https://www.tuicool.com/articles/hit/yANNJvM
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

PiExa- ->Raspberry Pi + Amazon Alexa: A step-by-step guide to build your own hands-free Alexa with Raspberry Pi

M otivation M onk: Read everyday something no one else is reading , Think everyday something no one else is thinking . It is bad for the mind to be always part of unanimity.

PiExa ?? I know you all must be wondering what this writer is upto, what is PiExa why would this term has anything to do with Amazon Alexa and Raspberry Pi. Well, my fellow readers all your explicit questions, doubts will be answered through the end of this article.

AnmEzaY.jpg!web

Objective:This article is a step by step comprehensive guide to build your own hands-free Amazon Alexa with Raspberry Pi 3, using Alexa Voice Service (AVS). Through this article I’ll demonstrates how to access and test AVS using their Java sample app (running on a Raspberry Pi), a Node.js server, and a third-party wake word engine. So, by the end of this article if you follow along with me you might have your own hands free Alexa up and talking to you.

Nomenclature:Purposefully I coined the term “ PiExa” which clearly reflects the amalgamation of Raspberry Pi with Amazon Alexa.

r6vyAnJ.jpg!web

Flashback:Few weeks back when I built my own open source natural language processing based voice assistant Mycroft for Raspberry Pi — Picroft , I started thinking is it possible to make my own Alexa using Raspberry Pi, with a cheap speaker and an Universal Serial Bus (USB) microphone in the same way as I built Picroft.

My curious mind and few google searches took me to the Alexa repository which allowed me to convert my simple thought into a reality.

So, without any further diddle-daddle let’s start the step by step execution of building your own Alexa with Raspberry Pi 3.

Hardware R equirement:

  1. Raspberry Pi 3 (Recommended) or Pi 2 Model B (Supported).
  2. Micro-USB power cable for Raspberry Pi.
  3. Micro SD Card (Minimum 8 GB) — You need an operating system to get started. NOOBS (New Out of the Box Software) is an easy-to-use operating system install manager for Raspberry Pi. You can download and install it on your SD card ver easily (for instructions check here ).
  4. USB 2.0 Mini Microphone — Raspberry Pi does not have a built-in microphone; to interact with Alexa you’ll need an external one to plug in.
  5. External Speaker with 3.5mm audio cable.
  6. A USB Keyboard & Mouse, and an external HDMI Monitor.
  7. Internet connection (Ethernet or WiFi)

After you collect all the ingredients (hardware) for this project, start following the below mentioned steps.

Step 1: Setting up your Pi

Note: Unless you already have Raspbian Stretch or Jessie installed on your Pi, please follow the guide — Setting up the Raspberry Pi which will walk you through downloading and installing Raspbian and connecting the hardware (if you’re unfamiliar with Raspberry Pi, I highly recommend you to follow the guide above to get your Pi up and ready before moving further).

If you have installed Raspbian Stretch Lite on your Pi, you will need to install Java in order to get the Java Sample App up and running. As long as you have an internet connection, you can use the following commands to do so:

sudo apt-get update
sudo apt-get install oracle-java8-jdk

Step 2: Register for an Amazon developer account

Unless you already have one, go ahead and create a free developer account at developer.amazon.com . Make sure you review the AVS Terms and Agreements here .

YZJn2yM.png!web

Step 3: Create a device and security profile

Follow the steps here to register your product and create a security profile.

Make note of the following parameters. You’ll need these in Step 5 below.

ProductID
ClientID
ClientSecret

Important: Make sure your Allowed Origins and Allowed Return URLs are set under Security Profile > Web (see Create a device and security profile ):

MviIjia.png!web

Step 4: Clone the sample app

Open terminal, and type the following:

cd Desktop
git clone https://github.com/alexa/alexa-avs-sample-app.git

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK