Version 1.10 alexa-client-sdk
Changes in this update:
**Enhancements**
* New optional configuration for [EqualizerController](https://github.com/alexa/avs-device-sdk/blob/v1.10.0/Integration/AlexaClientSDKConfig.json#L154). The EqualizerController interface allows you to adjust equalizer settings on your product, such as decibel (dB) levels and modes.
* Added reference implementation of the EqualizerController for GStreamer-based (MacOS, Linux, and Raspberry Pi) and OpenSL ES-based (Android) MediaPlayers. Note: In order to use with Android, it must support OpenSL ES.
* New optional configuration for the [TemplateRuntime display card value](https://github.com/alexa/avs-device-sdk/blob/v1.10.0/Integration/AlexaClientSDKConfig.json#L144).
* A configuration file generator script, `genConfig.sh` is now included with the SDK in the **tools/Install** directory. `genConfig.sh` and it's associated arguments populate `AlexaClientSDKConfig.json` with the data required to authorize with LWA.
* Added Bluetooth A2DP source and AVRCP target support for Linux.
* Added Amazon for Business (A4B) support, which includes support for handling the new [RevokeAuthorization](https://developer.amazon.com/docs/alexa-voice-service/system.html#revokeauth) directive in the Settings interface. A new CMake option has been added to enable A4B within the SDK, `-DA4B`.
* Added locale support for IT and ES.
* The Alexa Communication Library (ACL), `CBLAUthDelegate`, and sample app have been enhanced to detect de-authorization using the new `z` command.
* Added `ExternalMediaPlayerObserver`, which receives notification of player state, track, and username changes.
* `HTTP2ConnectionInterface` was factored out of `HTTP2Transport` to enable unit testing of `HTTP2Transport` and re-use of `HTTP2Connection` logic.
**Bug Fixes**
* Fixed a bug in which `ExternalMediaPlayer` adapter playback wasn't being recognized by AVS.
* [Issue 973](https://github.com/alexa/avs-device-sdk/issues/973) - Fixed issues related to `AudioPlayer` where progress reports were being sent out of order or with incorrect offsets.
* An `EXPECTING`, state has been added to `DialogUXState` in order to handle `EXPECT_SPEECH` state for hold-to-talk devices.
* [Issue 948](https://github.com/alexa/avs-device-sdk/issues/948) - Fixed a bug in which the sample app was stuck in a listening state.
* Fixed a bug where there was a delay between receiving a `DeleteAlert` directive, and deleting the alert.
* [Issue 839](https://github.com/alexa/avs-device-sdk/issues/839) - Fixed an issue where speech was being truncated due to the `DialogUXStateAggregator` transitioning between a `THINKING` and `IDLE` state.
* Fixed a bug in which the `AudioPlayer` attempted to play when it wasn't in the `FOREGROUND` focus.
* `CapabilitiesDelegateTest` now works on Android.
* [Issue 950](https://github.com/alexa/avs-device-sdk/issues/950) - Improved Android Media Player audio quality.
* [Issue 908](https://github.com/alexa/avs-device-sdk/issues/908) - Fixed compile error on g++ 7.x in which includes were missing.
2018-10-24 17:01:29 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License").
|
|
|
|
# You may not use this file except in compliance with the License.
|
|
|
|
# A copy of the License is located at
|
|
|
|
#
|
|
|
|
# http://aws.amazon.com/apache2.0
|
|
|
|
#
|
|
|
|
# or in the "license" file accompanying this file. This file is distributed
|
|
|
|
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
|
|
# express or implied. See the License for the specific language governing
|
|
|
|
# permissions and limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
LOCALE=${LOCALE:-'en-US'}
|
|
|
|
|
|
|
|
if [ $# -ne 5 ]
|
|
|
|
then
|
|
|
|
echo 'Usage: genConfig.sh <config.json file> <device_serial_number> <db path> <SDK Source Directory> <output AlexaClientSDKConfig.json file>'
|
|
|
|
echo '1) <config.json file> can be downloaded from developer portal and must contain the following:'
|
|
|
|
echo ' "clientId": "<OAuth client ID>"'
|
|
|
|
echo ' "productId": "<your product name for device>"'
|
|
|
|
echo '2) <device_serial_number> specifies the deviceInfo deviceSerialNumber in the output json file.'
|
|
|
|
echo '3) <db path> specifies the path to where the databases will be located.'
|
|
|
|
echo '4) <SDK Source Directory> specifies the root directory to where the avs-device-sdk source code is located.'
|
|
|
|
echo '5) <output AlexaClientSDKConfig.json file> output file'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
CONFIG_JSON_FILE=$1
|
|
|
|
if [ ! -f "$CONFIG_JSON_FILE" ]; then
|
|
|
|
echo "Config json file not found!"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
DEVICE_SERIAL_NUMBER=$2
|
|
|
|
if [[ ! "$DEVICE_SERIAL_NUMBER" =~ [0-9a-zA-Z_]+ ]]; then
|
|
|
|
echo 'Device serial number is invalid!'
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
CONFIG_DB_PATH=$3
|
|
|
|
|
|
|
|
SDK_SRC_PATH=$4
|
|
|
|
if [ ! -d "$SDK_SRC_PATH" ]; then
|
|
|
|
echo 'Alexa Device Source directory not found!'
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
INPUT_CONFIG_FILE="$SDK_SRC_PATH/Integration/AlexaClientSDKConfig.json"
|
|
|
|
if [ ! -f "$INPUT_CONFIG_FILE" ]; then
|
|
|
|
echo "AlexaClientSDKConfig.json file not found in source directory!"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
OUTPUT_CONFIG_FILE=$5
|
|
|
|
# Check if output file exists, if yes, create empty file.
|
|
|
|
if [ -f $OUTPUT_CONFIG_FILE ]; then
|
|
|
|
echo -n "" > $OUTPUT_CONFIG_FILE
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Convert to Windows path format if using MingGW
|
|
|
|
uname_str=$(uname -a)
|
|
|
|
if [[ "$uname_str" == "MINGW64"* ]]; then
|
|
|
|
INPUT_CONFIG_FILE=$(cygpath.exe -m ${INPUT_CONFIG_FILE})
|
|
|
|
OUTPUT_CONFIG_FILE=$(cygpath.exe -m ${OUTPUT_CONFIG_FILE})
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Read config.json file
|
|
|
|
#-------------------------------------------------------
|
|
|
|
# Read key value from config.json file
|
|
|
|
#-------------------------------------------------------
|
|
|
|
# Arguments are: json_key
|
|
|
|
read_config_json()
|
|
|
|
{
|
|
|
|
python << EOF
|
|
|
|
import json
|
|
|
|
value = ""
|
|
|
|
with open("${CONFIG_JSON_FILE}", "r") as f:
|
|
|
|
dict = json.load(f)
|
|
|
|
if "deviceInfo" in dict and "${1}" in dict["deviceInfo"]:
|
|
|
|
value = dict["deviceInfo"]["${1}"]
|
|
|
|
print(value)
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
CLIENT_ID=$(read_config_json "clientId")
|
|
|
|
if [[ ! "$CLIENT_ID" =~ amzn1\.application-oa2-client\.[0-9a-z]{32} ]]
|
|
|
|
then
|
|
|
|
echo 'client ID is invalid!'
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
PRODUCT_ID=$(read_config_json "productId")
|
|
|
|
if [[ ! "$PRODUCT_ID" =~ [0-9a-zA-Z_]+ ]]
|
|
|
|
then
|
|
|
|
echo 'product ID is invalid!'
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
########################################################################################################################
|
|
|
|
# Start of setting variables for generating $OUTPUT_CONFIG_FILE.
|
|
|
|
# All variables that needs to be substituted must be defined below "set -a" line!
|
|
|
|
########################################################################################################################
|
|
|
|
set -a
|
|
|
|
|
|
|
|
# Set variables for configuration file
|
|
|
|
# Variables for cblAuthDelegate
|
|
|
|
SDK_CBL_AUTH_DELEGATE_DATABASE_FILE_PATH=$CONFIG_DB_PATH/cblAuthDelegate.db
|
|
|
|
|
|
|
|
# Variables for deviceInfo
|
|
|
|
SDK_CONFIG_DEVICE_SERIAL_NUMBER=$DEVICE_SERIAL_NUMBER
|
|
|
|
SDK_CONFIG_CLIENT_ID=$CLIENT_ID
|
|
|
|
SDK_CONFIG_PRODUCT_ID=$PRODUCT_ID
|
|
|
|
|
|
|
|
# Variables for miscDatabase
|
|
|
|
SDK_MISC_DATABASE_FILE_PATH=$CONFIG_DB_PATH/miscDatabase.db
|
|
|
|
|
|
|
|
# Variables for alertsCapabilityAgent
|
|
|
|
SDK_SQLITE_DATABASE_FILE_PATH=$CONFIG_DB_PATH/alerts.db
|
|
|
|
|
Version 1.11 alexa-client-sdk
Changes in this update:
**Enhancements**
* Added support for the new Alexa [DoNotDisturb](https://developer.amazon.com/docs/alexa-voice-service/donotdisturb.html) interface, which enables users to toggle the do not disturb (DND) function on their Alexa built-in products.
* The SDK now supports [Opus](https://opus-codec.org/license/) encoding, which is optional. To enable Opus, you must [set the CMake flag to `-DOPUS=ON`](https://github.com/alexa/avs-device-sdk/wiki/Build-Options#Opus-encoding), and include the [libopus library](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies) dependency in your build.
* The MediaPlayer reference implementation has been expanded to support the SAMPLE-AES and AES-128 encryption methods for HLS streaming.
* AES-128 encryption is dependent on libcrypto, which is part of the required openSSL library, and is enabled by default.
* To enable [SAMPLE-AES](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies/Enable-SAMPLE-AES-decryption) encryption, you must set the `-DSAMPLE_AES=ON` in your CMake command, and include the [FFMPEG](https://github.com/alexa/avs-device-sdk/wiki/Dependencies#core-dependencies/Enable-SAMPLE-AES-decryption) library dependency in your build.
* A new configuration for [deviceSettings](https://github.com/alexa/avs-device-sdk/blob/v1.11.0/Integration/AlexaClientSDKConfig.json#L59) has been added.This configuration allows you to specify the location of the device settings database.
* Added locale support for es-MX.
**Bug Fixes**
* Fixed an issue where music wouldn't resume playback in the Android app.
* Now all equalizer capabilities are fully disabled when equalizer is turned off in configuration file. Previously, devices were unconditionally required to provide support for equalizer in order to run the SDK.
* [Issue 1106](https://github.com/alexa/avs-device-sdk/issues/1106) - Fixed an issue in which the `CBLAuthDelegate` wasn't using the correct timeout during request refresh.
* [Issue 1128](https://github.com/alexa/avs-device-sdk/issues/1128) - Fixed an issue in which the `AudioPlayer` instance persisted at shutdown, due to a shared dependency with the `ProgressTimer`.
* Fixed in issue that occurred when a connection to streaming content was interrupted, the SDK did not attempt to resume the connection, and appeared to assume that the content had been fully downloaded. This triggered the next track to be played, assuming it was a playlist.
* [Issue 1040](https://github.com/alexa/avs-device-sdk/issues/1040) - Fixed an issue where alarms would continue to play after user barge-in.
**Known Issues**
* `PlaylistParser` and `IterativePlaylistParser` generate two HTTP requests (one to fetch the content type, and one to fetch the audio data) for each audio stream played.
* Music playback history isn't being displayed in the Alexa app for certain account and device types.
* On GCC 8+, issues related to `-Wclass-memaccess` will trigger warnings. However, this won't cause the build to fail, and these warnings can be ignored.
* In order to use Bluetooth source and sink PulseAudio, you must manually load and unload PulseAudio modules after the SDK starts.
* The `ACL` may encounter issues if audio attachments are received but not consumed.
* `SpeechSynthesizerState` currently uses `GAINING_FOCUS` and `LOSING_FOCUS` as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* `make integration` is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* When the sample app is restarted and network connection is lost, alerts don't play.
* When network connection is lost, lost connection status is not returned via local Text-to Speech (TTS).
2018-12-19 19:13:36 +00:00
|
|
|
# Variables for device settings
|
|
|
|
SDK_SQLITE_DEVICE_SETTINGS_DATABASE_FILE_PATH=$CONFIG_DB_PATH/deviceSettings.db
|
|
|
|
|
Version 1.10 alexa-client-sdk
Changes in this update:
**Enhancements**
* New optional configuration for [EqualizerController](https://github.com/alexa/avs-device-sdk/blob/v1.10.0/Integration/AlexaClientSDKConfig.json#L154). The EqualizerController interface allows you to adjust equalizer settings on your product, such as decibel (dB) levels and modes.
* Added reference implementation of the EqualizerController for GStreamer-based (MacOS, Linux, and Raspberry Pi) and OpenSL ES-based (Android) MediaPlayers. Note: In order to use with Android, it must support OpenSL ES.
* New optional configuration for the [TemplateRuntime display card value](https://github.com/alexa/avs-device-sdk/blob/v1.10.0/Integration/AlexaClientSDKConfig.json#L144).
* A configuration file generator script, `genConfig.sh` is now included with the SDK in the **tools/Install** directory. `genConfig.sh` and it's associated arguments populate `AlexaClientSDKConfig.json` with the data required to authorize with LWA.
* Added Bluetooth A2DP source and AVRCP target support for Linux.
* Added Amazon for Business (A4B) support, which includes support for handling the new [RevokeAuthorization](https://developer.amazon.com/docs/alexa-voice-service/system.html#revokeauth) directive in the Settings interface. A new CMake option has been added to enable A4B within the SDK, `-DA4B`.
* Added locale support for IT and ES.
* The Alexa Communication Library (ACL), `CBLAUthDelegate`, and sample app have been enhanced to detect de-authorization using the new `z` command.
* Added `ExternalMediaPlayerObserver`, which receives notification of player state, track, and username changes.
* `HTTP2ConnectionInterface` was factored out of `HTTP2Transport` to enable unit testing of `HTTP2Transport` and re-use of `HTTP2Connection` logic.
**Bug Fixes**
* Fixed a bug in which `ExternalMediaPlayer` adapter playback wasn't being recognized by AVS.
* [Issue 973](https://github.com/alexa/avs-device-sdk/issues/973) - Fixed issues related to `AudioPlayer` where progress reports were being sent out of order or with incorrect offsets.
* An `EXPECTING`, state has been added to `DialogUXState` in order to handle `EXPECT_SPEECH` state for hold-to-talk devices.
* [Issue 948](https://github.com/alexa/avs-device-sdk/issues/948) - Fixed a bug in which the sample app was stuck in a listening state.
* Fixed a bug where there was a delay between receiving a `DeleteAlert` directive, and deleting the alert.
* [Issue 839](https://github.com/alexa/avs-device-sdk/issues/839) - Fixed an issue where speech was being truncated due to the `DialogUXStateAggregator` transitioning between a `THINKING` and `IDLE` state.
* Fixed a bug in which the `AudioPlayer` attempted to play when it wasn't in the `FOREGROUND` focus.
* `CapabilitiesDelegateTest` now works on Android.
* [Issue 950](https://github.com/alexa/avs-device-sdk/issues/950) - Improved Android Media Player audio quality.
* [Issue 908](https://github.com/alexa/avs-device-sdk/issues/908) - Fixed compile error on g++ 7.x in which includes were missing.
2018-10-24 17:01:29 +00:00
|
|
|
# Variables for bluetooth
|
|
|
|
SDK_BLUETOOTH_DATABASE_FILE_PATH=$CONFIG_DB_PATH/bluetooth.db
|
|
|
|
|
|
|
|
# Variables for certifiedSender
|
|
|
|
SDK_CERTIFIED_SENDER_DATABASE_FILE_PATH=$CONFIG_DB_PATH/certifiedSender.db
|
|
|
|
|
|
|
|
# Variables for notifications
|
|
|
|
SDK_NOTIFICATIONS_DATABASE_FILE_PATH=$CONFIG_DB_PATH/notifications.db
|
|
|
|
|
|
|
|
########################################################################################################################
|
|
|
|
# End of setting variables for generating $OUTPUT_CONFIG_FILE
|
|
|
|
# All variables that needs to be substituted must be defined above "set +a" line!
|
|
|
|
########################################################################################################################
|
|
|
|
set +a
|
|
|
|
|
|
|
|
# Use python template substitute to generate $OUTPUT_CONFIG_FILE
|
|
|
|
python << EOF
|
|
|
|
import os
|
|
|
|
from string import Template
|
|
|
|
with open("${INPUT_CONFIG_FILE}", "r") as f, open("${OUTPUT_CONFIG_FILE}", "w") as o:
|
|
|
|
o.write(Template(f.read()).safe_substitute(os.environ))
|
|
|
|
EOF
|
|
|
|
|
|
|
|
echo 'Completed generation of config file:' ${OUTPUT_CONFIG_FILE}
|