Ubuntu Linux Quick Start Guide

The following instructions show you how to set up the Alexa Smart Screen SDK on a computer running Ubuntu Linux. The instructions guide you through obtaining the SDK, installing and building the SDK, and running the included sample app.

Ubuntu prerequisites

  • Ubuntu Linux 18.04 LTS
  • Node.js v10.0 or higher

Procedure overview

The following task list outlines the procedure that you must follow to obtain, install, and build the Alexa Voice Service (AVS) Device SDK and the Alexa Smart Screen SDK to get the Smart Screen SDK sample app up and running on your computer. If you previously installed and ran the AVS Device SDK v1.19.0, you can skip the steps related to that.

Step 1: Create an AVS device on the Amazon developer portal

Before you can use both the AVS Device SDK sample app and the Alexa Smart Screen SDK sample app, you must have a test device registered as a placeholder on the Amazon developer portal.

Follow the instructions to register an AVS device and create a security profile for the AVS Device SDK, which generates a certificate that you can use with the AVS Device SDK and Alexa Smart Screen SDK sample apps.

Make sure that you download and save the config.json file for later use.

Step 2: Set up your development environment

Create a directory structure for the SDKs and dependencies. This page uses sdk_folder as the parent folder, while the AVS Device SDK instructions use my_project as the parent folder.

To set up your development environment

  1. Type the following commands to create the required directories.
    cd ~
    mkdir sdk_folder
    cd sdk_folder
    mkdir third-party sdk-install db
    
  2. Update and install the latest packages using apt-get.
    sudo apt-get update && sudo apt-get upgrade -y
    
  3. Type the following command to install the SDK dependencies.
    sudo apt-get install -y git gcc cmake openssl clang-format libgstreamer1.0-0 \ 
    gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
    gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev \
    gstreamer1.0-plugins-ugly gstreamer1.0-libav \
    gstreamer1.0-doc gstreamer1.0-tools libssl-dev \ 
    pulseaudio doxygen libsqlite3-dev curl \
    libcurl4-openssl-dev libasound2-dev
    
  4. Verify that the openssl and nghttp2 dependencies are installed; these dependencies are used to connect to AVS by using HTTP.
    sh
    curl --version
    

    Example output

    sh
    curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/  0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
    Release-Date: 2018-01-24
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp 
    Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL 
    

    If they are installed, you can proceed to Step 5.

    If they aren't installed, you'll need to manually install them.

    shell
    cd $HOME/my_project/third-party
    sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
    wget https://curl.haxx.se/download/curl-7.63.0.tar.gz
    tar xzf curl-7.63.0.tar.gz
       
    cd curl-7.63.0
    ./configure --with-nghttp2 --prefix=/usr/local --with-ssl
       
    make && sudo make install
    sudo ldconfig
    
  5. After you've manually installed the curl dependencies, verify that you can run curl.
    shell
    curl -I https://nghttp2.org/
    

    If the request succeeds, you will see a message like this.

    shell
    HTTP/2 200
    date: Fri, 15 Dec 2017 18:13:26 GMT
    content-type: text/html
    last-modified: Sat, 25 Nov 2017 14:02:51 GMT
    etag: "5a19780b-19e1"
    accept-ranges: bytes
    content-length: 6625
    x-backend-header-rtt: 0.001021
    strict-transport-security: max-age=31536000
    server: nghttpx
    via: 2 nghttpx
    x-frame-options: SAMEORIGIN
    x-xss-protection: 1; mode=block
    x-content-type-options: nosniff
    
  6. Download and build portaudio.

    a. Navigate to the third-party directory.

       cd third-party
    

    b. Download portaudio.

       wget -c http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
    

    Your command line interface (CLI) should display output similar to the following example when successful.

       --2019-10-22 12:02:02--  http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
       Resolving www.portaudio.com (www.portaudio.com)... 107.22.210.58
       Connecting to www.portaudio.com (www.portaudio.com)|107.22.210.58|:80... connected.
       HTTP request sent, awaiting response... 200 OK
       Saving to: ‘pa_stable_v190600_20161030.tgz’
    
       pa_stable_v190600_20161030.tgz    100%[===========================================================>]   1.38M  2.49MB/s    in 0.6s    
    
       2019-10-22 12:02:03 (2.49 MB/s) - ‘pa_stable_v190600_20161030.tgz’ saved [1450572/1450572]
    

    c. Extract the TGZ file.

       tar xf pa_stable_v190600_20161030.tgz
    

    d. Configure portaudio.

       cd portaudio
       ./configure --without-jack && make
    

    Your CLI window should display many lines of status updates as it configures portaudio.

Step 3: Download the AVS Device SDK, APL Core Library and Alexa Smart Screen SDK

  1. Download version 1.19.0 of the AVS Device SDK.
    cd ~/sdk_folder
    git clone --single-branch --branch v1.19.0 git://github.com/alexa/avs-device-sdk.git
    
  2. Download version 1.2 of the APL Core Library.
    cd ~/sdk_folder   
    git clone --single-branch --branch v1.2 git://github.com/alexa/apl-core-library.git
    
  3. Download the Alexa Smart Screen SDK.
    cd ~/sdk_folder   
    git clone git://github.com/alexa/alexa-smart-screen-sdk.git
    

Step 4: Build the AVS Device SDK

Because the Alexa Smart Screen SDK has several dependencies on the AVS Device SDK, you must build the AVS Device SDK and run the AVS Device SDK sample app before attempting to build and run the Alexa Smart Screen SDK and sample app.

To build the AVS Device SDK

  1. Create and enter a build folder for the AVS Device SDK.
    cd ~/sdk_folder
    mkdir sdk-build
    cd sdk-build
    
  2. Configure a cmake command for the AVS Device SDK.
     cmake ../avs-device-sdk \
    -DGSTREAMER_MEDIA_PLAYER=ON \
    -DPORTAUDIO=ON \
    -DPORTAUDIO_LIB_PATH=$HOME/sdk_folder/third-party/portaudio/lib/.libs/libportaudio.so \
    -DPORTAUDIO_INCLUDE_DIR=$HOME/sdk_folder/third-party/portaudio/include \
    -DCMAKE_BUILD_TYPE=DEBUG \
    -DCMAKE_INSTALL_PREFIX=$HOME/sdk_folder/sdk-install
    

    You should see output similar to the following truncated example if your cmake command is successful.

    Creating the build directory for the AlexaClientSDK with build type: DEBUG
    No keyword detector type specified, skipping build of keyword detector.
    Bluetooth implementation not supported
    CMake Warning (dev) at ThirdParty/googletest-release-1.8.0/CMakeLists.txt:3 (project):
      Policy CMP0048 is not set: project() command manages VERSION variables.
      Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
      command to set the policy and suppress this warning.
    
      The following variable(s) would be set to empty:
    
        PROJECT_VERSION
        PROJECT_VERSION_MAJOR
        PROJECT_VERSION_MINOR
    
        PROJECT_VERSION_PATCH
     This warning is for project developers.  Use -Wno-dev to suppress it.
    
     Bluetooth implementation not supported
     -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
     -- Configuring done
     -- Generating done
     -- Build files have been written to: /Users/me/sdk_folder/sdk-build
    

    If you see messages about missing GTEST, ignore them, as this library doesn't cause errors with the SDK or sample app.

  3. Build the AVS Device SDK.
    make -j4
    

    The build process for the SDK takes several minutes. Your CLI displays a scrolling set of status messages to inform you of the build process similar to the following.

    ...
    Scanning dependencies of target SampleApp
    [ 98%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/ConsolePrinter.cpp.o
    [ 98%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/ConsoleReader.cpp.o
    [ 98%] Built target DoNotDisturbCapabilityAgentTest
    [ 98%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/GuiRenderer.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/InteractionManager.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/KeywordObserver.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/LocaleAssetsManager.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/UIManager.cpp.o
    [ 99%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/UserInputManager.cpp.o
    [100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/SampleApplication.cpp.o
    [100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/SampleEqualizerModeController.cpp.o
    [100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/main.cpp.o
    [100%] Building CXX object SampleApp/src/CMakeFiles/SampleApp.dir/PortAudioMicrophoneWrapper.cpp.o
    [100%] Linking CXX executable SampleApp
    [100%] Built target SampleApp
    
  4. Install the AVS Device SDK.
    make install
    

    The installation takes several minutes. As with the build process, your CLI window displays scrolling status messages similar to the following.

    [ 15%] Built target AVSCommon
    [ 16%] Built target gmock_main
    [ 16%] Built target gtest
    [ 17%] Built target gtest_main
    [ 17%] Built target AttachmentCommonTestLib
    [ 17%] Built target NamespaceAndNameTest
    [ 17%] Built target HandlerAndPolicyTest
    [ 17%] Built target AttachmentTest
    [ 17%] Built target AttachmentWriterTest
    [ 18%] Built target ExceptionEncounteredSenderTest
    [ 18%] Built target CapabilityAgentTest
    [ 19%] Built target AttachmentUtilsTest
    [ 19%] Built target AttachmentReaderTest
    [ 20%] Built target DialogUXStateAggregatorTest
    
  5. Generate the AlexaClientSDKConfig.json file to be used by the sample apps for the SDKs.

    a. Navigate to the AVS Device SDK install directory.

       cd ~/sdk_folder/avs-device-sdk/tools/Install
    

    b. Run the genConfig.sh configuration script. Replace path-to-config.json with the config.json file that you downloaded from your security profile earlier, and replace device-serial-number with the serial number for the test device that you registered on the Developer Profile that corresponds to the config.json file.

       ./genConfig.sh path-to-config.json \
       device-serial-number \
       $HOME/sdk_folder/db \
       $HOME/sdk_folder/avs-device-sdk \
       $HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json
    

    The following example shows the output of the genConfig.sh configuration script.

      bash genConfig.sh /Users/me/my_project/source/avs-device-sdk/tools/Install/config.json \
      > SDKTestProduct \
      > $HOME/sdk_folder/db \
      > $HOME/sdk_folder/avs-device-sdk \
      > $HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json
    

    The CLI window displays confirmation the configuration file was successfully created.

       Completed generation of config file: /Users/me/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json
    

Step 5: Run the AVS Device SDK sample app

To confirm that you have installed and configured everything correctly on your computer, run the AVS Device SDK and try a few test Alexa commands.

To run the AVS Device SDK

  1. Navigate to the SampleApp source folder.
    cd ~/sdk_folder/sdk-build/SampleApp/src
    
  2. Run the sample app.
    ./SampleApp $HOME/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json DEBUG9
    

    The first time that you run the sample app, the text output will prompt you to enter a code to authorize the app.

To authorize the app

  1. In a web browser, go to amazon.com/us/code.
  2. Log in with your Amazon developer credentials.
  3. Enter the code shown in your sample app text output.

    The sample app running in your CLI connects to Alexa and displays confirmation that the app is running.

    You can now test out the sample app with the enabled mic on your computer.

To test the sample app

  • To ask Alexa a question, press t + Enter. You don't need to include "Alexa" at the start of your question. For example, try, "What time is it?" or "How is the weather?"
  • To quit and exit the app, press q + Enter.

If the sample app doesn't work, see Troubleshooting Alexa Smart Screen SDK for troubleshooting tips.

Step 6: Build the APL Core Library

The Alexa Smart Screen SDK has two components: the APL Core Library and the SDK itself. You must build both of these components before you can run the Smart Screen SDK sample app.

To learn more about the APL Core Library, see APL Core Library README.

To build the APL Core Library

  1. Navigate to the APL Core Library directory.
    cd ~/sdk_folder/apl-core-library
    
  2. Create and navigate to a build directory for the Core Library.
    mkdir build
    cd build
    
  3. Configure cmake.
    cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
    

    The command should display the following output.

    Building documentation
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/me/sdk_folder/apl-core-library/build
    
  4. Build the APL Core Library.
    make
    

    Your CLI output will display the build status.

    [  6%] Built target enumgen
    [ 13%] Built target yoga
    [ 18%] Built target rapidjson-build
    [ 24%] Built target pegtl-build
    [100%] Built target apl
    

Step 7: Build the Alexa Smart Screen SDK

After building the APL Core Library, build the Alexa Smart Screen SDK itself. You must install some additional dependencies for the Smart Screen SDK.

To build the Alexa Smart Screen SDK

  1. Install Node.js by running the following commands.
    curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
    sudo apt-get install -y nodejs
    
  2. Download and install websocketpp.

    a. Navigate to your third-party directory.

       cd ~/sdk_folder/third-party
    

    b. Download and extract websocketpp.

       wget https://github.com/zaphoyd/websocketpp/archive/0.8.1.tar.gz -O websocketpp-0.8.1.tar.gz
    

    You should see the following text output.

       --2019-10-22 15:04:25--  https://github.com/zaphoyd/websocketpp/archive/0.8.1.tar.gz
       Resolving github.com (github.com)... 192.30.255.113
       HTTP request sent, awaiting response... 302 Found
       Location: https://codeload.github.com/zaphoyd/websocketpp/tar.gz/0.8.1 [following]
       --2019-10-22 15:04:26--  https://codeload.github.com/zaphoyd/websocketpp/tar.gz/0.8.1
       Resolving codeload.github.com (codeload.github.com)... 192.30.255.121
       Connecting to codeload.github.com (codeload.github.com)|192.30.255.121|:443... connected.
       HTTP request sent, awaiting response... 200 OK
       Length: unspecified [application/x-gzip]
       Saving to: ‘websocketpp-0.8.1.tar.gz’
    
       websocketpp-0.8.1.tar.gz                      [ <=>                                                                                  ] 683.07K  3.69MB/s    in 0.2s    
    
       2019-10-22 15:04:26 (3.69 MB/s) - ‘websocketpp-0.8.1.tar.gz’ saved [699468]
    

    c. Extract websocketpp.

       tar -xvzf websocketpp-0.8.1.tar.gz
    

    You should see output similar to the following truncated example in your CLI window.

       x websocketpp-0.8.1/
       x websocketpp-0.8.1/.gitattributes
       x websocketpp-0.8.1/.gitignore
       x websocketpp-0.8.1/.travis.yml
       x websocketpp-0.8.1/CMakeLists.txt
       x websocketpp-0.8.1/COPYING
       x websocketpp-0.8.1/Doxyfile
       x websocketpp-0.8.1/SConstruct
    
  3. Install ASIO.
    sudo apt-get -y install libasio-dev
    
  4. Create and navigate into a build folder for the Smart Screen SDK.
    cd ~/sdk_folder
    mkdir ss-build
    cd ss-build
    
  5. Configure cmake.
    cmake -DCMAKE_PREFIX_PATH=$HOME/sdk_folder/sdk-install \
    -DWEBSOCKETPP_INCLUDE_DIR=$HOME/sdk_folder/third-party/websocketpp-0.8.1 \
    -DDISABLE_WEBSOCKET_SSL=ON \
    -DGSTREAMER_MEDIA_PLAYER=ON \
    -DCMAKE_BUILD_TYPE=DEBUG \
    -DPORTAUDIO=ON -DPORTAUDIO_LIB_PATH=$HOME/sdk_folder/third-party/portaudio/lib/.libs/libportaudio.so \
    -DPORTAUDIO_INCLUDE_DIR=$HOME/sdk_folder/third-party/portaudio/include/ \
    -DAPL_CORE=ON \
    -DAPLCORE_INCLUDE_DIR=$HOME/sdk_folder/apl-core-library/aplcore/include \
    -DAPLCORE_LIB_DIR=$HOME/sdk_folder/apl-core-library/build/aplcore \
    -DYOGA_INCLUDE_DIR=$HOME/sdk_folder/apl-core-library/build/yoga-prefix/src/yoga \
    -DYOGA_LIB_DIR=$HOME/sdk_folder/apl-core-library/build/lib \
    ../alexa-smart-screen-sdk
    

    The following example shows truncated output from cmake.

       No keyword detector type specified, skipping build of keyword detector.
    Bluetooth implementation not supported
    Creating the build directory for the CapabilityAgents with build type: DEBUG
    No keyword detector type specified, skipping build of keyword detector.
    Bluetooth implementation not supported
    -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
    -- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
    Creating the build directory for the ApplicationUtilities with build type: DEBUG
    No keyword detector type specified, skipping build of keyword detector.
    Bluetooth implementation not supported
    Creating the build directory for the SmartScreenClient with build type: DEBUG
    
    -- Generating done
    -- Build files have been written to: /Users/me/sdk_folder/ss-build
    
  6. Build the Smart Screen SDK.
    make
    

    Your screen output should look similar to the following example.

    [  5%] Built target AlexaPresentation
    [ 15%] Built target gmock_main
    [ 21%] Built target AlexaPresentationTest
    [ 26%] Built target SmartScreenTemplateRunTime
    [ 31%] Built target TemplateRuntimeTest
    [ 42%] Built target SmartScreenClient
    [100%] Built target SampleApp
    npm WARN gui@1.0.0 No repository field.
    npm WARN gui@1.0.0 license should be a valid SPDX license expression
    
    audited 6584 packages in 3.62s
    found 0 vulnerabilities
    
    > gui@1.0.0 build /Users/me/sdk_folder/Alexa-smart-screen-sdk-for-linux/modules/GUI/js
    > npm run lint && webpack --config webpack.config.js "--output-path" "/Users/me/sdk_folder/ss-build/modules/GUI" "--define" "DISABLE_WEBSOCKET_SSL=true"
    
    
    > gui@1.0.0 lint /Users/me/sdk_folder/Alexa-smart-screen-sdk-for-linux/modules/GUI/js
    > tslint --project tsconfig.json -c tslint.json 'src/**/*.ts' 'src/**/.tsx'
    
    Hash: 12462024bc3092060422
    Version: webpack 4.41.2
    Time: 13419ms
    Built at: 10/22/2019 3:30:20 PM
                                      Asset       Size  Chunks             Chunk Names
                               ../dist/app.d.ts   2.99 KiB          [emitted]  
        ../dist/components/buttonInterface.d.ts  285 bytes          [emitted]  
                   ../dist/components/home.d.ts  144 bytes          [emitted]  
             ../dist/components/nowplaying.d.ts  265 bytes          [emitted]  
     ../dist/components/serverSideRenderer.d.ts    1.5 KiB          [emitted]  
                       ../dist/environment.d.ts  103 bytes          [emitted]  
                   ../dist/lib/Environment.d.ts  248 bytes          [emitted]  
               ../dist/lib/NavigationEvent.d.ts  339 bytes          [emitted]  
        ../dist/lib/activity/ActivityEvent.d.ts  554 bytes          [emitted]  
      ../dist/lib/activity/ActivityTracker.d.ts   1.09 KiB          [emitted]  
                    ../dist/lib/avshelpers.d.ts   1.07 KiB          [emitted]  
                        ../dist/lib/client.d.ts    1.7 KiB          [emitted]  
           ../dist/lib/device/ExtraLargeTV.d.ts  217 bytes          [emitted]  
               ../dist/lib/device/LargeHub.d.ts  213 bytes          [emitted]  
              ../dist/lib/device/MediumHub.d.ts  214 bytes          [emitted]  
                 ../dist/lib/device/device.d.ts  975 bytes          [emitted]  
             ../dist/lib/focus/ChannelName.d.ts  343 bytes          [emitted]  
            ../dist/lib/focus/FocusManager.d.ts   2.06 KiB          [emitted]  
           ../dist/lib/focus/FocusResource.d.ts  296 bytes          [emitted]  
              ../dist/lib/focus/FocusState.d.ts  183 bytes          [emitted]  
        ../dist/lib/focus/IChannelObserver.d.ts  236 bytes          [emitted]  
            ../dist/lib/focus/IFocusBridge.d.ts  248 bytes          [emitted]  
          ../dist/lib/media/AVSAudioPlayer.d.ts   1.25 KiB          [emitted]  
                ../dist/lib/media/AVSVideo.d.ts   1.43 KiB          [emitted]  
                      ../dist/lib/messages.d.ts   3.22 KiB          [emitted]  
                        ../dist/lib/screen.d.ts  179 bytes          [emitted]  
               ../dist/lib/sdkLogTransport.d.ts  842 bytes          [emitted]  
                              ../dist/main.d.ts   21 bytes          [emitted]  
            ../dist/model/renderPlayerInfo.d.ts  976 bytes          [emitted]  
           20dbd5eaf289a6e63cf91f8c05c37cf6.png   5.34 KiB          [emitted]  
                                     index.html  187 bytes          [emitted]  
                                 main.bundle.js   4.18 MiB    main  [emitted]  main
    Entrypoint main = main.bundle.js
    [../../apl-client/index.js] /Users/me/sdk_folder/Alexa-smart-screen-sdk-for-linux/modules/GUI/apl-client/index.js 490 KiB {main} [built]
    [../node_modules/css-loader/dist/cjs.js!./main.css] 4.46 KiB {main} [built]
    [./app.tsx] 13.5 KiB {main} [built]
    [./images/alexa.png] 82 bytes {main} [built]
    [./lib/NavigationEvent.ts] 648 bytes {main} [built]
    [./lib/activity/ActivityEvent.ts] 883 bytes {main} [built]
    [./lib/activity/ActivityTracker.ts] 2.1 KiB {main} [built]
    [./lib/avshelpers.ts] 2.26 KiB {main} [built]
    [./lib/client.ts] 3.45 KiB {main} [built]
    [./lib/device/device.ts] 2.26 KiB {main} [built]
    [./lib/focus/FocusManager.ts] 3.71 KiB {main} [built]
    [./lib/screen.ts] 529 bytes {main} [built]
    [./lib/sdkLogTransport.ts] 1.7 KiB {main} [built]
    [./main.tsx] 885 bytes {main} [built]
        + 33 hidden modules
    Child html-webpack-plugin for "index.html":
         1 asset
        Entrypoint undefined = index.html
           4 modules
    [100%] Built target GUIClient
    

Step 8: Run the Alexa Smart Screen SDK sample app

After you have successfully built the AVS Device SDK, APL Core Library, and Alexa Smart Screen SDK, you can run and experiment with the Alexa Smart Screen SDK sample app.

To run the sample app

  1. Navigate into your Smart Screen SDK build folder.
    cd ~/sdk_folder/ss-build
    
  2. Run the sample app, making sure to point to the correct path where you generated your configuration file.
    ./modules/Alexa/SampleApp/src/SampleApp -C ~/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json -C ~/sdk_folder/alexa-smart-screen-sdk/modules/GUI/config/guiConfigSamples/GuiConfigSample_SmartScreenLargeLandscape.json -L INFO
    

    If you receive any error messages at this step, check Troubleshooting Alexa Smart Screen SDK, which addresses several common sample app execution errors. You can also try running the sample again, changing the verbosity level from INFO to DEBUG9.

    When the app successfully initializes and runs, your CLI window displays scrolling text output similar to the following truncated example.

    Running app with log level: DEBUG0
    2019-10-23 17:53:31.864 [  1] 0 ConfigurationNode:initializeSuccess
    2019-10-23 17:53:32.023 [  1] I LocaleAssetsManager:initialize:supportedWakeWords=NONE
    2019-10-23 17:53:32.033 [  6] I WebSocketServer:Listening for websocket connections:interface=127.0.0.1,port=8933
    2019-10-23 17:53:32.198 [  1] I Setting:handleSetValue:value=false
    2019-10-23 17:53:32.205 [  1] I Setting:handleSetValue:value="NONE"
    2019-10-23 17:53:32.206 [  1] I Setting:handleSetValue:value="NONE"
    2019-10-23 17:53:32.207 [  1] I Setting:handleSetValue:value="America/Vancouver"
    2019-10-23 17:53:32.209 [ 11] I LocaleAssetsManager:changeAssets:Locale=["en-US"],WakeWords=[]
    2019-10-23 17:53:32.219 [ 14] 0 MediaPlayer:handleSetObserverCalled:name=SystemSoundMediaPlayer
    2019-10-23 17:53:32.225 [ 17] 0 MediaPlayer:handleSetObserverCalled:name=SpeakMediaPlayer
    2019-10-23 17:53:32.232 [ 1a] 0 MediaPlayer:handleSetObserverCalled:name=AudioMediaPlayer
    2019-10-23 17:53:32.234 [  1] 0 SpeakerManager:mapCreated:numSpeakerVolume=6,numAlertsVolume=1
    2019-10-23 17:53:32.243 [ 1d] 0 MediaPlayer:handleSetObserverCalled:name=AlertsMediaPlayer
    2019-10-23 17:53:32.254 [ 20] 0 MediaPlayer:handleSetObserverCalled:name=NotificationsMediaPlayer
    2019-10-23 17:53:32.260 [  1] 0 ExternalMediaPlayer:createAdapters
    #################################################
    #       NOTIFICATION INDICATOR STATE: OFF       #
    #################################################
    ...
    
  3. To view and interact with Alexa in your web browser, navigate to ~/sdk_folder/ss-build/modules/GUI, and open the index.html file in a web browser.

    Your web browser displays the Alexa Smart Screen splash screen.

    AlexaSplashScreen
  4. Press and hold the A key on your keyboard to interact with Alexa. For example, with your mic and speakers enabled, press and hold the A key and ask, "What time is it?" (You don't need to preface your question with "Alexa".)

    Alexa responds with the current time.

  5. To try a question with a visual component, press and hold the A key and ask, "How is the weather?"

    Alexa recites and displays the current forecast.

    WeatherForecast
  6. Try open an interactive skill, and interact with the skill not only verbally, but through your web browser. For example, press and hold the A key and ask, "Open Kayak."

    Alexa opens the Kayak skill in your web browser.

  7. To browse for flights on Kayak, click or say "Search Flights."

  8. Try some of these other questions to explore various Alexa skills:

    • "Who is Jeff Bezos?"
    • "Tell me a joke."
    • "What does a Corgi look like?"
    • "Play Jeopardy."
    • "Open Food Network."
  9. To end the session, press Ctrl+C in your CLI window.

To learn more about the things that you can try with the Smart Screen SDK, see the Alexa Multi-Modal API Overview.

Optional features

Now that you've installed the Alexa Smart Screen SDK and tested it by running the sample app, you can add optional features, such as captions, to your device.

Add captions

The following procedure shows how to add captions to your device.

To add captions to your device

  1. Download and install webvtt in a directory that's independent of the SDK directories, for example, $HOME/captions.

  2. Build the AVS Device SDK as you did in Step 4: Build the AVS Device SDK, only this time include webvtt by adding the following flags when you configure your cmake command.
     -DCAPTIONS=ON \
     -DLIBWEBVTT_LIB_PATH=$HOME/captions/webvtt-master/build/src/webvtt/libwebvtt.a \
     -DLIBWEBVTT_INCLUDE_DIR=$HOME/captions/webvtt-master/include
    
  3. Build the Alexa Smart Screen SDK as you did in Step 7: Build the Alexa Smart Screen SDK, only this time include webvtt by adding the following flags when you configure your cmake command.
       -DCAPTIONS=ON \
       -DLIBWEBVTT_LIB_PATH=$HOME/captions/webvtt-master/build/src/webvtt/libwebvtt.a \
       -DLIBWEBVTT_INCLUDE_DIR=$HOME/captions/webvtt-master/include
    
  4. Run the Alexa Smart Screen SDK sample app as you did in Step 8: Run the Alexa Smart Screen SDK sample app. Captions are not enabled by default. After opening the sample app in the browser, press the C key on your keyboard to toggle captions on. The caption setting persists across restarts.

Modify the Smart Screen SDK configuration file for your device

For guidance on using the configuration file to define your device's visual capabilities, functionality, and supported server communication, see the Smart Screen SDK Config Specification.