Following on from my last blog post “Raspberry Pi and Amazon Alexa Voice Service” I decided on a wet and windy Saturday to install Alexa Voice Service onto my Raspberry Pi 3.
I followed the steps to install Alexa (https://github.com/amzn/alexa-avs-raspberry-pi) onto my Raspberry Pi 3 with some changes to versions of software to the latest builds.
Firstly extracting NOOBS at v1.9.0 Built: Mar 18 2016 – onto an 8GB Micro SD Card on my PC, then putting the SD Card into the Pi3 and booting from it.
Clicked to install Raspbian, which now needs 3029 MB space to install. The install itself took a while to extract the filesystem and install it. It extracted at around 3.6 MB/Sec.
Perhaps I should have just put a Raspian build onto my SD card using Win32 Disk Imager as that can build at around 16 MB/Sec using the PC rather than the Pi to extract the files.
The latest build does not display the Raspi-config screen. After build it reboots once you click the OK prompt straight into Raspbian.
The next stage it to get into the Raspi-config screen anyway from the Terminal prompt using the command:
sudo raspi-config
I went into the Advanced Options and then enabled SSH.
Using PuTTY I SSH’d onto my Pi 3 and installed VNC using:
sudo apt-get install tightvncserver
After starting the tightvncserver, I followed the instructions to autostart VNC by creating the autostart config.
Next I installed VLC as instructed using:
sudo apt-get install vlc-nox vlc-data
I did run into some Fetch Errors so followed the below
Unable to fetch errors If you run into some “Unable to fetch” errors while trying to install VLC, try the following:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vlc-nox vlc-data
These sorted out the install of VLC and I then set the variables for VLC.
export LD_LIBRARY_PATH=/usr/lib/vlc
export VLC_PLUGIN_PATH=/usr/lib/vlc/plugins
Next task is to install Java.
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs
Then following the instructions to install the Java JDK.
- Raspberry Pi 3 model – The binary you are looking for is “Linux ARM 64 Soft Float ABI”. Download the tar.gz file jdk-8u77-linux-arm64-vfp-hflt.tar.gz from the Oracle link above.
At this point I checked a Pull request into the Github page and noted that it had been corrected by some one to note
Although there is a 64-bit ARMv8 that Apple and some other smartphones use, there are no raspberry 64-bit ARM processors on pis yet. More info: [Raspberry Piblog.com](http://www.rpiblog.com/2014/03/installing-oracle-jdk-8-on-raspberry-pi.html)#
Thanks to pix64 for that nugget.
The easiest way to get the file onto your Raspberry Pi is to download it using the Pi itself. If you have download via the web browser on Raspian, the file will most probably be in the /home/pi/downloads directory. From the terminal you can type:
cd /home/pi/downloads
ls
This should show the file jdk-8u73-linux-arm32-vfp-hflt.tar.gz in the directory. Using the following command to move the file to the /usr/local directory.
sudo mv jdk-8u73-linux-arm32-vfp-hflt.tar.gz /usr/local
(Dont forget to use the tab key on the file name so you don’t have to type out the whole name. Start with JDK then tab).
You will need build 73 as the latest (77) isn’t compatiable with the build at this time
Returning to my PC and the SSH terminal I then extracted the .gz
sudo tar zxvf jdk-8u73-linux-arm32-vfp-hflt.tar.gz -C /opt
I then set the Java defaults with
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_73/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_73/bin/java 1
sudo update-alternatives --config javac
sudo update-alternatives --config java
Next is to install Maven which I downloaded on the PI and moved the file in the same way I did for the Oracle JDK. Downloaded from https://maven.apache.org/download.cgi
Again returning to my PC and the SSH terminal I extracted the .gz
sudo tar zxvf apache-maven-3.3.9-bin.tar.gz -C /opt
Then I set the defaults as instructed in the GitHub instructions for Alexa Voice Service.
At this point the instructions said that a .zip could be downloaded – Download the sample apps zip file. You can use http://kinolien.github.io/gitzip/ to help zip up the files to a .zip to download entering https://github.com/amzn/alexa-avs-raspberry-pi as the sub folder/sub directory to zip.
I downloaded this file to my Pi3 and extracted it. Renaming the directory to Alexa for easy reference. Storing it in the downloads area for now.
Following the instructions I ensured my Amazon Developer account was configured correctly.
The next part involved following the instructions to the letter as per the GitHub page to set the configuration and keys for the Alexa Voice Service.
I then installed Java 8 as per the instructions. This took a while to complete.
Now to test out the Alexa Voice Service app.
When I finally get a Pi Zero, I will try this config on that board. The Zero would certainly make a low entry point to the Alexa Voice Service.
The developer pages for Alexa Voice Service are at: https://developer.amazon.com/public/solutions/alexa/alexa-voice-service
Like this:
Like Loading...