Alexa Auto SDK  4.3
Public Types | Static Public Member Functions | List of all members
aace::alexa::config::AlexaConfiguration Class Reference

Public Types

enum  TemplateRuntimeTimeoutType {
  TemplateRuntimeTimeoutType::DISPLAY_CARD_TTS_FINISHED_TIMEOUT,
  TemplateRuntimeTimeoutType::DISPLAY_CARD_AUDIO_PLAYBACK_FINISHED_TIMEOUT,
  TemplateRuntimeTimeoutType::DISPLAY_CARD_AUDIO_PLAYBACK_STOPPED_PAUSED_TIMEOUT
}
 
using TemplateRuntimeTimeout = std::pair< TemplateRuntimeTimeoutType, std::chrono::milliseconds >
 
using EqualizerBand = aace::alexa::EqualizerControllerEngineInterface::EqualizerBand
 
using EqualizerBandLevel = aace::alexa::EqualizerControllerEngineInterface::EqualizerBandLevel
 

Static Public Member Functions

static std::shared_ptr< aace::core::config::EngineConfigurationcreateAlexaClientInfoConfig (const std::string &clientId, const std::string &productId, const std::string &amazonId)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateNotificationsConfig (const std::string &databaseFilePath)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateCertifiedSenderConfig (const std::string &databaseFilePath)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateCapabilitiesDelegateConfig (const std::string &databaseFilePath)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateCurlConfig (const std::string &certsPath, const std::string &iface="", const std::string &proxy="")
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateSettingsConfig (const std::string &databaseFilePath, const std::string &locale="en-US")
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateDeviceSettingsConfig (const std::string &databaseFilePath, const std::vector< std::string > &locales={"en-US", "en-GB", "de-DE", "en-IN", "en-CA", "ja-JP", "en-AU", "fr-FR", "it-IT", "es-ES", "es-MX", "fr-CA", "es-US", "hi-IN", "pt-BR", "ar-SA"}, const std::string &defaultLocale="en-US", const std::string &defaultTimezone="America/Vancouver", const std::vector< std::vector< std::string >> &localeCombinations={})
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateMiscStorageConfig (const std::string &databaseFilePath)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateSpeakerManagerConfig (bool enabled)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateSystemConfig (uint32_t firmwareVersion)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateSpeechRecognizerConfig (const std::string &encoderName)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateTemplateRuntimeTimeoutConfig (const std::vector< TemplateRuntimeTimeout > &timeoutList)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateExternalMediaPlayerConfig (const std::string &agent)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateEqualizerControllerConfig (const std::vector< EqualizerBand > &supportedBands={}, int minLevel=-6, int maxLevel=6, const std::vector< EqualizerBandLevel > &defaultBandLevels={})
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateAuthProviderConfig (const std::vector< std::string > &providerNames)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateDuckingConfig (bool duckingEnabled)
 
static std::shared_ptr< aace::core::config::EngineConfigurationcreateMediaPlayerFingerprintConfig (const std::string &package, const std::string &buildType, const std::string &versionNumber)
 

Detailed Description

A factory interface for creating Alexa configuration objects

Member Typedef Documentation

◆ TemplateRuntimeTimeout

Identifies a Template Runtime configuration with a type and value pair

◆ EqualizerBand

Describes the equalizer bands supported by Alexa. The platform implementation may support a subset of these.

See also
aace::alexa::EqualizerControllerEngineInterface::EqualizerBand

◆ EqualizerBandLevel

Describes the level of gain of a particular equalizer band as an integer dB value. This is an aace::alexa::EqualizerController::EqualizerBand and int pair.

See also
aace::alexa::EqualizerControllerEngineInterface::EqualizerBandLevel

Member Enumeration Documentation

◆ TemplateRuntimeTimeoutType

enum specifying the configurable TemplateRuntime timeout.

Enumerator
DISPLAY_CARD_TTS_FINISHED_TIMEOUT 

Display Card timeout in ms when Alexa completes TTS

DISPLAY_CARD_AUDIO_PLAYBACK_FINISHED_TIMEOUT 

Display Card timeout in ms when AudioPlayback Completes.

DISPLAY_CARD_AUDIO_PLAYBACK_STOPPED_PAUSED_TIMEOUT 

Display Card timeout in ms when AudioPlayback Stopped or Paused.

Member Function Documentation

◆ createAlexaClientInfoConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createAlexaClientInfoConfig ( const std::string &  clientId,
const std::string &  productId,
const std::string &  amazonId 
)
static

Factory function used to programmatically generate alexa client device info configuration data. The data generated by this function is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"alexaClientInfo": {
"clientId": "<CLIENT_ID>",
"productId": "<PRODUCT_ID>",
"amazonId": "<AMAZON_ID>"
}
}
}
Parameters
[in]clientIdThe client ID of the product in the AVS developer console
[in]productIdThe product ID of the product in the AVS developer console
[in]amazonIdThe Amazon ID of the product in the AVS developer portal

◆ createNotificationsConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createNotificationsConfig ( const std::string &  databaseFilePath)
static

Factory method used to programmatically generate notifications configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"avsDeviceSDK": {
"notifications": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent notifications data. The database will be created on initialization if it does not already exist.

◆ createCertifiedSenderConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createCertifiedSenderConfig ( const std::string &  databaseFilePath)
static

Factory method used to programmatically generate certified sender configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"avsDeviceSDK": {
"certifiedSender": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent certified sender data. The database will be created on initialization if it does not already exist.

◆ createCapabilitiesDelegateConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createCapabilitiesDelegateConfig ( const std::string &  databaseFilePath)
static

Factory method used to programmatically generate capabilities delegate configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"avsDeviceSDK": {
"capabilitiesDelegate": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store device capabilities. The database will be created on initialization if it does not already exist.

◆ createCurlConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createCurlConfig ( const std::string &  certsPath,
const std::string &  iface = "",
const std::string &  proxy = "" 
)
static

Factory method used to programmatically generate CURL configuration data.

The 'libCurlUtils' sub-component of the global configuration supports the following options:

  • CURLOPT_CAPATH If present, specifies a value for the libcurl property CURLOPT_CAPATH.
  • CURLOPT_INTERFACE if present, specifies a value for the libcurl property CURLOPT_INTERFACE.

The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"avsDeviceSDK": {
"libcurlUtils": {
"CURLOPT_CAPATH": "<CA_CERTIFICATES_FILE_PATH>",
"CURLOPT_INTERFACE": "<NETWORK_INTERFACE_NAME>",
"CURLOPT_PROXY": "<PROXY_ADDRESS>"
}
}
}
}
Parameters
[in]certsPathThe file path to the directory holding CA certificates
[in]ifaceThe specific network interface to use. This can be a network interface name, an IP address or a host name. Default to the system's primary network interface.
[in]proxyThe proxy used for outgoing requests.

◆ createSettingsConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createSettingsConfig ( const std::string &  databaseFilePath,
const std::string &  locale = "en-US" 
)
static
Deprecated:
Use AlexaConfiguration::createDeviceSettingsConfig().

Factory method used to programmatically generate settings configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"avsDeviceSDK": {
"deviceSettings": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>",
"defaultAVSClientSettings": {
"locale": "<LOCALE>"
}
}
}
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent settings data. The database will be created on initialization if it does not already exist.
[in]localeThe current locale setting on the client. Default to "en-US".

◆ createDeviceSettingsConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createDeviceSettingsConfig ( const std::string &  databaseFilePath,
const std::vector< std::string > &  locales = {"en-US", "en-GB", "de-DE", "en-IN", "en-CA", "ja-JP", "en-AU", "fr-FR", "it-IT", "es-ES", "es-MX", "fr-CA", "es-US", "hi-IN", "pt-BR", "ar-SA"},
const std::string &  defaultLocale = "en-US",
const std::string &  defaultTimezone = "America/Vancouver",
const std::vector< std::vector< std::string >> &  localeCombinations = {} 
)
static

Factory method used to programmatically generate device settings configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"avsDeviceSDK": {
"deviceSettings": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>",
"locales": [<LIST_OF_LOCALE_STRINGS>],
"defaultLocale": "<DEFAULT_LOCALE_STRING>",
"localeCombinations": [[<LOCALE_STRING_PAIR>]],
"defaultTimezone": "<TIMEZONE>"
}
}
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent settings data. The database will be created on initialization if it does not already exist.
[in]localesA list of locales supported by the device. The default is ["en-US","en-GB","de-DE", "en-IN","en-CA","ja-JP","en-AU","fr-FR","it-IT","es-ES","es-MX","fr-CA","es-US","hi-IN","pt-BR","ar-SA"]. For the accepted values, refer to https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/system.html#locales
[in]defaultLocaleThe default locale setting on the device. The default is "en-US".
[in]defaultTimezoneThe default timezone setting on the device. The default is "America/Vancouver". For accepted values, refer to the accepted timezones here: https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/system.html#timezonechanged
[in]localeCombinationsA list of locale combinations supported by the device for dual-locale mode. The permitted combinations are [["en-CA","fr-CA"],["fr-CA","en-CA"],["en-US","es-US"], ["es-US","en-US"],["en-IN","hi-IN"],["hi-IN","en-IN"],["en-US","fr-FR"],["fr-FR","en-US"], ["en-US","de-DE"],["de-DE","en-US"],["en-US","ja-JP"],["ja-JP","en-US"],["en-US","it-IT"], ["it-IT","en-US"],["en-US","es-ES"],["es-ES","en-US"]]. Any locale specified in this list must also be specified in the locales list.

◆ createMiscStorageConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createMiscStorageConfig ( const std::string &  databaseFilePath)
static

Factory method used to programmatically generate misc storage configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"avsDeviceSDK": {
"miscDatabase": {
"databaseFilePath": "<SQLITE_DATABASE_FILE_PATH>"
}
}
}
}
Parameters
[in]databaseFilePathThe file path to the SQLite database used to store persistent misc storage data. The database will be created on initialization if it does not already exist.

◆ createSpeakerManagerConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createSpeakerManagerConfig ( bool  enabled)
static

Factory method used to programmatically generate speaker manager configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"speakerManager": {
"enabled": [true|false]
}
}
}
Parameters
[in]enabledEnable or disable the speaker manager (default is enabled)

◆ createSystemConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createSystemConfig ( uint32_t  firmwareVersion)
static

Factory method used to programmatically generate system configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"system": {
"firmwareVersion": "<FIRMWARE_VERSION>"
}
}
}
Parameters
[in]firmwareVersionThe firmware version of the client device

◆ createSpeechRecognizerConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createSpeechRecognizerConfig ( const std::string &  encoderName)
static

Factory method used to programmatically generate encoder configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"speechRecognizer": {
"encoder": {
"name": "<ENCODER_NAME>"
}
}
}
}
Parameters
[in]encoderNameThe encoder codec name to be used

◆ createTemplateRuntimeTimeoutConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createTemplateRuntimeTimeoutConfig ( const std::vector< TemplateRuntimeTimeout > &  timeoutList)
static

Factory method used to programmatically generate template runtime configuration data. This is an optional configuration. Following are the accepted keys and their description.

  • displayCardTTSFinishedTimeout If present, specifies the values in milli seconds to control the timeout of display card at the end of Alexa TTS.
  • displayCardAudioPlaybackFinishedTimeout If present, specifies the values in milli seconds to control the timeout of display card at the FINISHED state of AudioPlayback.
  • displayCardAudioPlaybackStoppedPausedTimeout If present, specifies the values in milli seconds to control the timeout of display card at STOP or PAUSE state of AudioPlayback. The data generated by this method is equivalent to providing the following JSON values in a configuration:
{
"aace.alexa": {
"templateRuntimeCapabilityAgent": {
"displayCardTTSFinishedTimeout": <TIMEOUT_IN_MS>,
"displayCardAudioPlaybackFinishedTimeout": <TIMEOUT_IN_MS>,
"displayCardAudioPlaybackStoppedPausedTimeout": <TIMEOUT_IN_MS>
}
}
}
Parameters
[in]timeoutListA list of TemplateRuntimeTimeout type and value pairs

◆ createExternalMediaPlayerConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createExternalMediaPlayerConfig ( const std::string &  agent)
static

Factory method used to programmatically generate external media player configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"externalMediaPlayer": {
"agent": "<agent>"
}
}
}
Parameters
[in]agentThe external media player agent

◆ createEqualizerControllerConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createEqualizerControllerConfig ( const std::vector< EqualizerBand > &  supportedBands = {},
int  minLevel = -6,
int  maxLevel = 6,
const std::vector< EqualizerBandLevel > &  defaultBandLevels = {} 
)
static

Factory method used to programmatically generate equalizer controller configuration data. This is an optional configuration, and default settings will be used if configuration is not provided. This method produces configuration data according to the JSON structure in the sample below.

{
"aace.alexa": {
"equalizer": {
"bands": {
"BASS": true,
"MIDRANGE": false,
"TREBLE": true
},
"defaultState": {
"bands": {
"BASS": 4,
"TREBLE": -1
}
},
"minLevel": -6,
"maxLevel": 6
}
}

The configuration branches are used as follows:

  • equalizer.bands: Specifies which bands are supported by the device and will be enabled for control with Alexa. Each child key is the name of an Alexa-supported band ("BASS", "MIDRANGE", or "TREBLE") and value is whether the device supports the band. Only bands explicitly declared supported will be enabled in the SDK and Alexa. Omitting this branch enables all bands by default.
  • equalizer.defaultState: Describes the default or reset state of the equalizer. These settings are used to reset the equalizer with Alexa such as by saying "Alexa, reset bass." If this branch or its child is omitted, default values will be used.
  • equalizer.defaultState.bands: Defines the default gain level setting in dB for each supported equalizer band. Each element key is the name of a supported band and value is a level (int) specifying the default gain in dB. All of the supported bands must be provided once this branch is defined. All dB levels must obey the limits declared in "equalizer.minLevel" and "equalizer.maxLevel". Omitting this branch uses the default 0dB for each band.
  • equalizer.minLevel and equalizer.maxLevel: Integer values specifying the decibel level range on which Alexa may operate for the supported bands. The device may support a different range internally, but Alexa will know only about the limits declared here. Values should be specified as absolute amplitude gain in integer dB and scaled to the platform's internal range as necessary. If these values are omitted, the default range min -6dB and max +6dB will be used.
Parameters
supportedBandsA list of supported equalizer bands. Corresponds to the "equalizer.bands" config branch. Only bands provided in the list will be enabled. Unspecified or empty supportedBands omits the config branch. Nonempty supportedBands includes the branch and declares each band in the list with a value "true".
minLevelThe minimum gain level for the equalizer bands in integer dB. Corresponds to "equalizer.minLevel". Unspecified minLevel uses the -6dB default.
maxLevelThe maximum gain level for the equalizer bands in integer dB. Corresponds to "equalizer.maxLevel". Unspecified maxLevel uses the +6dB default.
defaultBandLevelsThe default or reset state of the equalizer bands. Corresponds to the "equalizer.defaultState.bands" config branch. Unspecified or empty defaultBandLevels omits the config branch.

◆ createAuthProviderConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createAuthProviderConfig ( const std::vector< std::string > &  providerNames)
static

Factory method used to programmatically generate auth provider configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"authProvider": {
"providers": [<LIST_OF_PROVIDER_NAMES_STRINGS>]
}
}
}
Parameters
providerNamesThe list of auth providers

◆ createDuckingConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createDuckingConfig ( bool  duckingEnabled)
static

Factory method used to programmatically generate music ducking configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"audio": {
"audioOutputType.music": {
"ducking": {
"enabled": [true|false]
}
}
}
}
}
Parameters
duckingEnabledtrue if ducking is enabled

◆ createMediaPlayerFingerprintConfig()

static std::shared_ptr<aace::core::config::EngineConfiguration> aace::alexa::config::AlexaConfiguration::createMediaPlayerFingerprintConfig ( const std::string &  package,
const std::string &  buildType,
const std::string &  versionNumber 
)
static

Factory method used to programmatically generate media player fingerprint configuration data. The data generated by this method is equivalent to providing the following JSON values in a configuration file:

{
"aace.alexa": {
"mediaPlayerFingerprint": {
"package": "<package>",
"buildType": "<buildType>",
"versionNumber": "<versionNumber>"
}
}
}
See also
https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/audioplayer.html#capability-assertion
Parameters
packageUnique identifier for the audio player software loaded on the device.
buildTypeThe audio player build type.
versionNumberIdentifies the version of the audio player loaded on your device.
Returns
std::shared_ptr<aace::core::config::EngineConfiguration>

Alexa Auto SDK 4.3 - Copyright 2017-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0