Build the AVS Device SDK
Download the SDK configuration scripts
Next, download the AVS Device SDK configuration scripts from the AVS Device SDK GitHub repository. These scripts contain all the logic to build the SDK. When you run them, they download the AVS Device SDK and install any required dependencies. These scripts get updated with each SDK release and automatically download the latest SDK for you.
Open your terminal to the
/home/pi directory. Enter the following command as single block statement.
wget https://raw.githubusercontent.com/alexa/avs-device-sdk/master/tools/Install/setup.sh \ wget https://raw.githubusercontent.com/alexa/avs-device-sdk/master/tools/Install/genConfig.sh \ wget https://raw.githubusercontent.com/alexa/avs-device-sdk/master/tools/Install/pi.sh
Run the install script
The setup.sh script builds the SDK and installs dependencies that allow your device to the following.
- Maintain an HTTP/2 connection with AVS.
- Play Alexa TTS and music.
- Record audio from the microphone.
- Store records in a persistent storage database.
To run the install script, open a terminal and run setup.sh using your config.json file and a device serial number (DSN) as arguments. If you get an error, make sure your config.json file is in the same folder as the setup.sh script.
cd /home/pi/ sudo bash setup.sh config.json [-s 1234]
The field in brackets is the Device Serial Number which is unique to each instance of the SDK. In the example, it's pre-populated with 1234. If you don't supply a DSN, the SDK generates of default value of 123456.
Agree to the terms and conditions
When prompted with the licensing terms from the external libraries, enter "AGREE" — Unless, of course, you disagree! Agreeing to the conditions starts the installation process which might take over 20 minutes.
Sensory wake word
At some point, the SDK installation pauses and asks you to accept Sensory Wake Word terms and conditions — you must type yes to accept. The Wake Word Engine (WWE) from Sensory compares incoming audio to an onboard model of a wake word ("Alexa"), and initiates the transmission of audio to the cloud when triggered.
The WWE is for prototyping devices. If you intend to ship a commercial device, you must get a WWE license.
Finish compiling the SDK
After you've finished compiling the SDK, a success message appears — [100%] Built Target SampleApp.