Use the AVS Device SDK sample app
Congratulations on creating your first AVS prototype. If your sample app is running, you see the following ASCII art in the terminal window.
# # # ##### ##### ###### # #
# # # # # # # # # # # #
# # # # # # # # # #
# # # # ##### ##### # # ###
####### # # # # # # # #
# # # # # # # # # # # #
# # # ##### ##### ###### # #
##### #
# # ## # # ##### # ###### # # ##### #####
# # # ## ## # # # # # # # # # #
##### # # # ## # # # # ##### # # # # # #
# ###### # # ##### # # ####### ##### #####
# # # # # # # # # # # # #
##### # # # # # ###### ###### # # # #
Authorize the sample app
Before you can use the sample app, you have to authorize it with Amazon. To learn how to do this, follow the instructions in the applicable quick start guide.
- Android quick start guide
- MacOS quick start guide
- Raspberry Pi quick start guide
- Ubuntu quick start guide
- Windows 64 quick start guide
Unauthorized device
Before you have authorized the sample app, your terminal displays a NOT YET AUTHORIZED
message. This means that the AVS client is waiting for authorization.
##################################
# NOT YET AUTHORIZED #
##################################
################################################################################################
# To authorize, browse to: 'https://amazon.com/us/code' and enter the code: {XXXX} #
################################################################################################
Authorized device
After you have authorized the sample app, your terminal displays an Authorized!
message. This means that the AVS client is waiting for you to initiate a conversation.
###########################
# Authorized! #
###########################
########################################
# Alexa is currently idle! #
########################################
Test the sample app for the first time
To test the sample app
-
Say "Alexa" into the microphone. If you don't have a wake word enabled, you can trigger Alexa by using tap-to-talk.
You should see a series of messages scrolling in your terminal window. One of these messages shows a
Listening
status. This status indicates that the wake word you spoke triggered Alexa. -
Say "Tell me a joke."
Alexa responds with a funny joke. You should see the text change from
Listening
toThinking...
, thenSpeaking
.Here is a screenshot of the text that illustrates what state the sample app is in.
Interactions
You can trigger Alexa with a wake word or by using tap-to-talk. This configuration depends on what operating system you're using and what CMake parameters you used to build the SDK.
Interact with Alexa by using tap-to-talk
If your sample app doesn't use a wake word, press T+Enter to talk to Alexa. This command simulates a Tap-to-Talk interaction, which is equivalent to saying the Alexa wake word. To interact with the sample app, you might still have to connect a microphone to your computer. A standard pair of earbuds with a microphone attached should work.
For example:
You (T+Enter): "What's the weather like?"
Alexa: "Right now in Portland, it's 71 degrees with sun…"
Interact with Alexa by using a wake word
If your sample app uses a wake word engine, start your interaction by speaking the "Alexa" wake word.
For example:
You: "Alexa, what is the current weather?"
Alexa: "Right now in Portland, it's 71 degrees with sun….
Try a multi-turn interaction
A multi-turn interaction is more natural method of communication with Alexa. You can continue on a conversation without starting every phrase with the "Alexa" wake word.
For example:
- Say Alexa.
- Ask Set an alarm".
- When Alexa asks you What time, say a number, such as 8.
- Alexa then asks you if you meant AM or PM.
- Respond with the appropriate choice.
You probably noticed that despite having a bit of back and forth with Alexa, you only had to say the wake word once at the start of the conversation.
To recognize this process in the sample app
In your terminal window, you can scroll up until you see the UI state LISTENING
. Right above that you'll see that the state of the Audio Input Processor (AIP) has changed from IDLE
to EXPECTING_SPEECH
and then RECOGNIZING
– all without requiring the wake word again. This automated process only occurs during multi-turn turn interactions.
You can learn more about multi-turn interactions on the SpeechRecognizer page.

Other multi-turn interactions to try
- Say "Alexa, Wikipedia." You have the option to request information about multiple topics without speaking the wake word before the subject.
- Say "Alexa, let's chat." Initiates a conversation with a chat bot.
Multi-lingual interactions
Alexa can speak multiple languages, such as Japanese, German, Hindi, and other global dialects of English.
To try some of these settings
- Start the sample app.
- Press c + Enter.
- Press 1 to see the various language options.
When you ship your product and your customer tries to change languages, your device needs to send a SettingsUpdated
event to the cloud.

Sample app menu options
Interaction options
Action | Command |
---|---|
Tap to talk | t+Enter, followed by your query (no need to say "Alexa…"). |
Hold to talk | h+Enter, followed by your query (no need to say "Alexa…"). |
Simulate button release | h+Enter |
Stop an interaction | s+Enter |
Playback controls
Action | Command |
---|---|
Play | 1 |
Pause | 2 |
Next | 3 |
Previous | 4 |
Settings
Action | Command |
---|---|
View available settings | c+Enter |
Adjust speaker settings | p+Enter |
Report firmware version | f+Enter |
Help screen | i+Enter |
Reset device | k+Enter. This command erases any data stored on the device and you have to reauthorize your sample app. It also exits the app. |
Quit | q+Enter |
Setting options
View the different settings that you can modify in the sample app.
Action | Command |
---|---|
Language options | 1 + Enter |
Do Not Disturb options | 2 + Enter |
Wake word confirmation | 3 + Enter |
Speech confirmation | 4 + Enter |
Time zone options | 5 + Enter |
Network options | 6 + Enter |
Alarm Volume Ramp | 7 + Enter |
Settings Options | q + Enter |
Language options
Changes the default locale in the sample app.
Action | Command |
---|---|
de-DE | 1 + Enter |
en-AU | 2 + Enter |
en-CA | 3 + Enter |
en-GB | 4 + Enter |
en-IN | 5 + Enter |
en-US | 6 + Enter |
es-ES | 7 + Enter |
es-MX | 8 + Enter |
es-US | 9 + Enter |
fr-CA | 10 + Enter |
fr-FR | 11 + Enter |
hi-IN | 12 + Enter |
it-IT | 13 + Enter |
ja-JP | 14 + Enter |
pt-BR | 15 + Enter |
["en-CA","fr-CA"] | 16 + Enter |
["fr-CA","en-CA"] | 17 + Enter |
Do Not Disturb configuration
Enable or Disable Do No Disturb.
Action | Command |
---|---|
Enable Do Not Disturb | E + Enter |
Disable Do Not Disturb | D + Enter |
Wake word confirmation configuration
Action | Command |
---|---|
Enable Wake Word Confirmation Configuration | E + Enter |
Disable Wake Word Confirmation Configuration | D + Enter |
Speech confirmation configuration
Action | Command |
---|---|
Enable Speech confirmation | E + Enter |
Disable Speech confirmation | D + Enter |
TimeZone configuration
Modify the default timeZone. For example, you are presented with a menu featuring various timeZones, as shown in the following table.
Action | Command |
---|---|
America/Vancouver | 1 + Enter |
America/Edmonton | 2 + Enter |
America/Winnipeg | 3 + Enter |
America/Toronto | 4 + Enter |
America/Halifax | 5 + Enter |
America/St_Johns | 6 + Enter |
Network info configuration
Update the network information on your device.
Action | Command |
---|---|
Display current network info | 1 + Enter |
Set connection type | 2 + Enter |
Set the network name (ESSID) | 3 + Enter |
Set physical access point name | 4 + Enter |
Set IP Address | 5 + Enter |
Set subnet mask | 6 + Enter |
Set MAC address | 7 + Enter |
Set DHCP server address | 8 + Enter |
Set static IP settings | 9 + Enter |
Alarm volume ramp
Enable or disable ascending alarms.
Action | Command |
---|---|
Enable Alarm volume ramp | E + Enter |
Disable Alarm volume ramp | D + Enter |
Sample app debug mode
You can run the sample app in debug mode to troubleshoot your device and run diagnostic tools. If the sample app is running in debug mode, you see the following message when it first starts.
SDK Version 1.20.1
WARNING! THIS DEVICE HAS BEEN COMPILED IN DEBUG MODE.
RELEASING A PRODUCTION DEVICE IN DEBUG MODE MAY IMPACT DEVICE PERFORMANCE,
DOES NOT COMPLY WITH THE AVS SECURITY REQUIREMENTS,
AND COULD RESULT IN SUSPENSION OR TERMINATION OF THE ALEXA SERVICE ON YOUR DEVICES.
Troubleshooting
- Can't hear sound: If you don't hear any sound, make sure that both your microphone and speakers are both working.
- Sample app is unresponsive: If Alexa isn't responding or the sample app appears stuck (or displaying error messages when you try to speak), type
s + enter
to stop that interaction. You can also typeq + enter
to exit the sample app.
For more details on how to troubleshoot other common issues, see the Troubleshooting Guide.
Last updated: Oct 07, 2021