-
Notifications
You must be signed in to change notification settings - Fork 25
MacOS Quick Start Guide
This page describes how to set up the Alexa Smart Screen SDK on a computer running MacOS. The instructions on this page will guide you through obtaining the SDK, installing and building the SDK, and running the included sample app.
Note: If you previously installed the AVS SDK v1.15 and were able to successfully run the sample app on your Mac, you can skip the setup steps related to the AVS SDK and start by downloading the Smart Screen SDK, as described in Step 3. If you have a different version of the AVS SDK installed, follow the instructions on this page to install v1.15.
- MacOS High Sierra or Mojave
- AVS SDK v1.15
- Python (minimum version 2.7.x)
- Homebrew
- XCode command line tools
To check your installed versions, type the following commands:
python -V brew --version xcode-select --version
Note: If you receive any error messages indicating that Python, Homebrew, or XCode were not installed, download and install the appropriate version of the missing prerequisite before proceeding.
The following task list outlines the process that you will need to 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 Mac OS computer. If you have previously installed and ran the AVS SDK v1.15, you can skip the steps related to that.
- Step 1: Create an AVS device on the developer portal, including a security profile.
- Step 2: Set up your development environment on your Mac.
- Step 3: Download the AVS Device SDK and Alexa Smart Screen SDK to your Mac.
- Step 4: Build the AVS Device SDK.
- Step 5: Run the AVS Device SDK sample app.
- Step 6: Build the APL Core Library.
- Step 7: Build the Alexa Smart Screen SDK.
- Step 8: Run the Alexa Smart Screen SDK sample app.
One of the prerequisites for using both the AVS Device SDK sample app and the Alexa Smart Screen SDK sample app is to have a test device registered as a placeholder on the Amazon Developer Portal.
Follow the instructions to Create a Security Profile for the AVS Device SDK, which will generate a certificate that you can use with the AVS Device SDK and sample apps.
Make sure that you download and save the config.json
file for later use.
To set up your development environment on your Mac:
- Create a directory structure for the SDKs and dependencies. Note that this page uses
sdk_folder
as the parent folder, while the AVS SDK instructions usemy_project
as the parent folder.
Type the following commands to create the required directories:
cd ~ mkdir sdk_folder cd sdk_folder mkdir sdk-build third-party sdk-install db
-
Install and configure curl-openssl:
brew install curl-openssl
If successful, you should see something similar to the following output as curl-openssl is installed:
==> Downloading https://homebrew.bintray.com/bottles/curl-openssl-7.66.0.mojave.bottle.tar.gz Already downloaded: /Users/userid/Library/Caches/Homebrew/downloads/d1759c9021d53e9cb5f5b21d7fec34e53f5468217a09760b70fd26d024742c1a--curl-openssl-7.66.0.mojave.bottle.tar.gz ==> Pouring curl-openssl-7.66.0.mojave.bottle.tar.gz ==> Caveats because macOS already provides this software and installing another version in parallel can cause all kinds of trouble. If you need to have curl-openssl first in your PATH run: echo 'export PATH="/usr/local/opt/curl-openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find curl-openssl you may need to set: export LDFLAGS="-L/usr/local/opt/curl-openssl/lib" export CPPFLAGS="-I/usr/local/opt/curl-openssl/include" For pkg-config to find curl-openssl you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/curl-openssl/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/curl-openssl/7.66.0: 454 files, 3.4MB
-
Add the path for curl-openssl to your .bash_profile:
echo export PATH="/usr/local/opt/curl-openssl/bin:$PATH" >> ~/.bash_profile
-
Type the following commands to install the SDK dependencies:
brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav sqlite3 repo cmake clang-format doxygen wget git
As each dependency installs, your terminal shell will display a status message with confirmation that the installation was successful.
-
Download and build portaudio:
-
CD into the third-party dirctory:
cd third-party
-
Download portaudio:
wget -c http://www.portaudio.com/archives/pa_stable_v190600_20161030.tgz
Your terminal 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]
-
Extract the TGZ file:
tar xf pa_stable_v190600_20161030.tgz
-
Configure portaudio:
cd portaudio ./configure --disable-mac-universal && make
Your terminal window should display many lines of status updates as it configures portaudio.
-
-
Set your
PKG_CONFIG_PATH
.-
Determine the path on your Mac:
brew info openssl
You should see something similar to the following example as your command output:
SSL/TLS cryptography library https://openssl.org/ /usr/local/Cellar/openssl/1.0.2t (1,787 files, 12.0MB) Built from source on 2019-10-01 at 10:59:16 ==> Caveats keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash openssl is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. If you need to have openssl first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find openssl you may need to set: export LDFLAGS="-L/usr/local/opt/openssl/lib" export CPPFLAGS="-I/usr/local/opt/openssl/include" For pkg-config to find openssl you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig" ==> Analytics install: 241,350 (30 days), 1,009,469 (90 days), 6,078,549 (365 days) install_on_request: 82,017 (30 days), 184,444 (90 days), 872,262 (365 days)
-
Update the
PKG_CONFIG_PATH
. Replace path-to-openssl in the following example with your own path to openssl. To obtain this path, copy the path in the above output that looks similar tousr/local/Cellar/openssl/1.0.2r
.echo export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:/_path-to-openssl_/lib/pkgconfig:$PKG_CONFIG_PATH" >> ~/.bash_profile
-
-
Clone the git repo for the AVS Device SDK v1.15:
cd ~/sdk_folder git clone --single-branch --branch v1.15 git://github.com/alexa/avs-device-sdk.git
-
Clone the git repo for 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
-
Clone the git repo for the Alexa Smart Screen SDK:
cd ~/sdk_folder git clone git://github.com/alexa/alexa-smart-screen-sdk.git
Because the Alexa Smart Screen SDK has several dependencies on the AVS Device SDK, you will need to 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:
-
Create and enter a build folder for the AVS Device SDK:
cd ~/sdk_folder mkdir sdk-build cd sdk-build
-
Configure a cmake command for the AVS Device SDK:
cmake ../avs-device-sdk \ -DGSTREAMER_MEDIA_PLAYER=ON \ -DCURL_LIBRARY=/usr/local/opt/curl-openssl/lib/libcurl.dylib \ -DCURL_INCLUDE_DIR=/usr/local/opt/curl-openssl/include \ -DPORTAUDIO=ON \ -DPORTAUDIO_LIB_PATH=$HOME/sdk_folder/third-party/portaudio/lib/.libs/libportaudio.a \ -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 sample 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.
... Sample output truncated for length...
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 will not cause errors with the SDK or sample app.
-
Build the AVS Device SDK:
make -j4
The build process for the SDK takes several minutes. Your terminal will display a scrolling set of status messages to inform you of the build process. For example:
... 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
-
Install the AVS Device SDK:
make install
The installation also takes several minutes. As with the build process, your terminal window will display scrolling status messages. For example:
[ 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
-
Generate the
AlexaClientSDKConfig.json
file to be used by the sample apps for the SDKs.-
Navigate to the AVS SDK install directory:
cd ~/sdk_folder/avs-device-sdk/tools/Install
-
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 replacedevice-serial-number
with the serial number for the test device that you registered on the Developer Profile that corresponds to theconfig.json
file.
bash 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
For example:
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 terminal window displays confirmation the configuration file was successfully created:
Completed generation of config file: /Users/me/sdk_folder/sdk-build/Integration/AlexaClientSDKConfig.json
-
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:
- Navigate to the SampleApp source folder:
cd ~/sdk_folder/sdk-build/SampleApp/src
-
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:
- In a web browser, go to amazon.com/us/code.
- Log in with your Amazon developer credentials.
- Enter the code shown in your sample app text output.
The sample app running in your terminal connects to Alexa and displays confirmation that the app is running:
# # # ##### ##### ###### # # # # # # # # # # # # # # # # # # # # # # # # # # # # ##### ##### # # ### ####### # # # # # # # # # # # # # # # # # # # # # # # ##### ##### ###### # # ##### # # # ## # # ##### # ###### # # ##### ##### # # # ## ## # # # # # # # # # # ##### # # # ## # # # # ##### # # # # # # # ###### # # ##### # # ####### ##### ##### # # # # # # # # # # # # # ##### # # # # # ###### ###### # # # # SDK Version 1.15.0
You can now test out the sample app with the enabled mic on your laptop:
- Press t + Enter to ask Alexa a question. You do not need to include "Alexa" at the start of your question. For example, try, "What time is it?" or "How is the weather?"
- Press q + Enter to quit and exit the app.
The Alexa Smart Screen SDK has two components: the APL Core Library and the SDK itself. You will need to 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:
-
Navigate to the APL Core Library directory:
cd ~/sdk_folder/APLCoreLibrary
-
Create and enter a build directory for the APL Core Library:
mkdir build cd build
-
Configure cmake:
cmake ..
The command should display the following output:
CMake Warning (dev) in CMakeLists.txt: No project() command is present. The top-level CMakeLists.txt file must contain a literal, direct call to the project() command. Add a line of code such as project(ProjectName) near the top of the file, but after cmake_minimum_required(). CMake is pretending there is a "project(Project)" command on the first line. This warning is for project developers. Use -Wno-dev to suppress it. Using Clang Building documentation -- Configuring done -- Generating done -- Build files have been written to: /Users/me/sdk_folder/APLCoreLibrary/build
-
Build the APL Core Library:
make
Your terminal 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
After building the APL Core Library, build the Alexa Smart Screen SDK itself. You will need to install a few additional dependencies for the Smart Screen SDK.
To build the SDK:
-
Download and install websocketpp:
-
Navigate to your third-party directory:
cd ~/sdk_folder/third-party
-
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]
-
Extract websocketpp:
tar -xvzf websocketpp-0.8.1.tar.gz
You should see output similar to the following truncated example in your terminal 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
-
-
Install ASIO:
brew install asio
-
Install NodeJS, if you have not previously installed NodeJS:
brew install node@8
-
Create and navigate into a build folder for the Smart Screen SDK:
cd ~/sdk_folder mkdir ss-build cd ss-build
-
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.a \ -DPORTAUDIO_INCLUDE_DIR=$HOME/sdk_folder/third-party/portaudio/include/ \ -DAPL_CORE=ON \ -DAPLCORE_INCLUDE_DIR=$HOME/sdk_folder/APLCoreLibrary/aplcore/include \ -DAPLCORE_LIB_DIR=$HOME/sdk_folder/APLCoreLibrary/build/aplcore \ -DYOGA_INCLUDE_DIR=$HOME/sdk_folder/APLCoreLibrary/build/yoga-prefix/src/yoga \ -DYOGA_LIB_DIR=$HOME/sdk_folder/APLCoreLibrary/build/lib \ ../Alexa-smart-screen-sdk-for-linux
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
...
WARNING: Target "SampleApp" requests linking to directory "/usr/local/Cellar/gst-plugins-base/1.16.1/lib". Targets may link only to libraries. CMake is dropping the item. WARNING: Target "SampleApp" requests linking to directory "/usr/local/Cellar/glib/2.62.1/lib". Targets may link only to libraries. CMake is dropping the item. WARNING: Target "SampleApp" requests linking to directory "/usr/local/opt/gettext/lib". Targets may link only to libraries. CMake is dropping the item. -- Generating done -- Build files have been written to: /Users/me/sdk_folder/ss-build
-
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 [email protected] No repository field. npm WARN [email protected] license should be a valid SPDX license expression audited 6584 packages in 3.62s found 0 vulnerabilities > [email protected] 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" > [email protected] 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] 20db d5eaf289a6e63cf91f8c05c37cf6.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
Note: If you receive any error messages at this step, check the Alexa Smart Screen SDK Troubleshooting Guide, which addresses several common build errors for Macs.
Once 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 on your Mac.
To run the sample app:
-
Navigate into your Smart Screen SDK build folder:
cd ~/sdk_folder/ss-build
-
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/sdk-build/Integration/SmartScreenSDKConfig.json -L INFO
If you receive any error messages at this step, check the Alexa Smart Screen SDK Troubleshooting Guide, which addresses several common sample app execution errors for Macs. You can also try running the sample again, changing the verbosity level from
INFO
toDEBUG9
.When the app successfully initializes and runs, your terminal window will display 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 # ################################################# ...
-
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.
-
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 do not need to preface your question with "Alexa".)Alexa responds with the current time.
-
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:
-
If you open an interactive skill, you will be able to interact with the skill not only verbally, but through your web browser, as well. For example, press and hold the
A
key and ask, "Open Kayak."Alexa opens the Kayak skill in your web browser.
-
Click or say "Search Flights" to browse flights on Kayak.
-
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.
-
To end the session, press Ctrl+C in your terminal window.
To learn more about the things that you can try with the Smart Screen SDK, see the Alexa Presentation Overview.
For guidance on using the config to define your device's visual capabilities, functionality, and supported server communication, see the Smart Screek SDK Configuration Specification.
Alexa Smart Screen SDK
Quick Start Guides
APIs and Reference
Resources