Print Friendly, PDF & Email

Components Required:

1. Raspberry Pi 3 model B – Buy

2. MicroSD card 8 or 16 GB (Class 4 and above) with Raspbian

3. Windows PC / Linux PC (Tested on Windows 10, Ubuntu 14.04 LTS)

4. Micro USB cable – Buy

5. USB 2.0 Mini Microphone / USB Webcam with built-in microphone.

6. External Speaker with 3.5mm audio socket/stereo headset jack

7. Internet connection (Ethernet or WiFi)


1. OS – You are running Raspbian Jessie

2. Naming conventions:

a) Location: The location of your project files is

b) Product ID: my_device.

c) DSN: 123456

d) Passphrase: is left blank

Note: If you do not follow these conventions, you’ll need to manually update the following files and values:

a) config.js - location, product id, DSN

b) config.json - location, passphrase

Way to go ->

1. Login to your Pi using PuTTy or your Ubuntu terminal.

2. Login to your Pi GUI using VNC server (Linux / Windows).

3. Install VLC media player.

Note: If you already have VLC installed, you will have to remove two conflicting libraries by running the following commands.

Unable to fetch errors: If you run into some “Unable to fetch” errors while trying to install VLC, try the following:

a) Make sure VLC is installed correctly

Type the following into the terminal:

This will provide you with the installation path.

Most programs are stored in /usr/bin.

b) Set the environment variables  for VLC.

Type the following into the terminal:

c) Check if the environment variables were set successsfully.

4. Download the sample application.

a) Register for a free Amazon Developer Account. Get a free Amazon developer account if you do not already have one.


b) Download the sample application and dependencies on your Pi. Download the sample app zip file from the Github repository.

c) Unless you downloaded the zip directly onto your Pi, copy and expand the .zip file on your Pi to



5. Download and install Node.js

6. Install NPM:

7. Install Java Development Kit (version 8 or higher)

You will get a message from Oracle Java Installer that you must accept the Terms of Service for Java SE Platform. Say “Yes” to the Terms of Service.

8. Verify JDK version

9. Make sure JDK and ALPN versions match.

Using the file manager on your Pi, navigate to


In the text editor, open pom.xml and locate <alpn-boot.version>xxx</alpn-boot.version>

Confirm the ALPN version matched your JDK version using the table located at If the versions do not match, update the pom.xml with the correct ALPN version and save.

10. Download the file apache-maven-3.3.9-bin.tar.gz from

11. Setup maven.

In the editor (nano), add the following to and save it

Logout of the Pi and login. Check maven:

12. Generate self-signed certificates.

Enter the following information exactly, when prompted.

product ID: my_device

serial number (DSN): 123456

password: press Enter to leave to blank

password: press Enter to leave to blank

Getting started with Alexa Voice Service (AVS)

13. Login to Amazon Developer Portal.

14. Click on Apps & Services tab -> Alexa -> Alexa Voice Service -> Get Started
















Update the config files

15. Login to Pi via VNC and open config.js

16. Edit the following values and save.



17. Run the server via VNC (make sure you’re logged into your Pi via VNC)

18. Start the client via VNC (make sure you’re logged into your Pi via VNC). In a new terminal window:

19. Build the app.

There will be a “BUILD SUCCESS” message in the terminal.


20. Run the client app, by typing: 

21. When the client is run there is a pop up message.

Copy/paste the url in your web browser in the Pi.


Note: Due to the use of a self-signed certificate, there may be a warning about an insecure website. This is expected. It is safe to ignore this warning during testing.

22. Enter your Amazon credentials.




23. After device tokens ready, return to the java application and click OK.


24. Click Start Listening, and wait for the audio cue before speaking. It may take a second or before you hear the audio cue.


25. Click Stop Listening, when you are done speaking.