Configure AlexaClientSDKConfig.json

The AlexaClientSDKConfig file contains parameters that control how the Alexa Voice Service (AVS) Device SDK builds the sample app. Modifying these parameters might be necessary if you want to change the default build of the SDK. The SDK build might fail if AlexaClientSDKConfig.json is missing information or contains invalid parameters.

This following reference material details the values contained in the AlexaClientSDKConfig.json file.

JSON reference

JSON Schema
 {
    "cblAuthDelegate":{
        "databaseFilePath":"${SDK_CBL_AUTH_DELEGATE_DATABASE_FILE_PATH}"
    },
    "lwaAuthorization":{
        "databaseFilePath":"${SDK_LWA_AUTHORIZATION_ADAPTER_DATABASE_FILE_PATH}"
    },
    "deviceInfo":{
        "deviceSerialNumber":"${SDK_CONFIG_DEVICE_SERIAL_NUMBER}",
        "clientId":"${SDK_CONFIG_CLIENT_ID}",
        "productId":"${SDK_CONFIG_PRODUCT_ID}",
        "manufacturerName": "${SDK_CONFIG_MANUFACTURER_NAME}",
        "description": "${SDK_CONFIG_DEVICE_DESCRIPTION}"
    },
    "avsGatewayManager":{
        "avsGateway":"{{STRING}}"
    },
    "capabilitiesDelegate":{
        "databaseFilePath":"${SDK_CAPABILITIES_DELEGATE_DATABASE_FILE_PATH}"
    },
    "miscDatabase":{
        "databaseFilePath":"${SDK_MISC_DATABASE_FILE_PATH}"
    },
    "alertsCapabilityAgent":{
        "databaseFilePath":"${SDK_SQLITE_DATABASE_FILE_PATH}"
    },
    "deviceSettings":{
        "databaseFilePath":"${SDK_SQLITE_DEVICE_SETTINGS_DATABASE_FILE_PATH}",
        "locales":["{{STRING}}"],
        "defaultLocale":"{{STRING}}",
        "localeCombinations":["{{STRING}}"],
        "defaultTimezone":"{{STRING}}"
    },
    "bluetooth":{
        "databaseFilePath":"${SDK_BLUETOOTH_DATABASE_FILE_PATH}"
    },
    "certifiedSender":{
        "databaseFilePath":"${SDK_CERTIFIED_SENDER_DATABASE_FILE_PATH}"
    },
    "notifications":{
        "databaseFilePath":"${SDK_NOTIFICATIONS_DATABASE_FILE_PATH}"
    },
    "diagnostics":{
        "protocolTraceFromStartup": {{BOOLEAN}},
        "maxTracedMessages": {{INT}}
    },
    "externalMediaPlayer":{
        "agentString": "{{STRING}}"
    },
    "audioPlayer":{
        "audioMediaPlayerPoolSize": {{INT}}
    },
    "sampleApp":{
        "displayCardsSupported":{{BOOLEAN}},
        "firmwareVersion":{{BOOLEAN}},
        "endpoint:" "{{STRING}}",
        "portAudio":{
        "suggestedLatency": {{LONG}}
        }
    },
   "gstreamerMediaPlayer":{
     "outputConversion":{
          "rate":{{INT}},
          "format":"{{STRING}}",
          "channels":{{INT}}
      },
      "audioSink":"{{STRING}}"
  },
  "libcurlUtils":{
     "CURLOPT_CAPATH":"INSERT_YOUR_CA_CERTIFICATE_PATH_HERE",
     "CURLOPT_INTERFACE":"INSERT_YOUR_INTERFACE_HERE"
  },
  "logging":{
    "logLevel":"{{STRING}}"
  },
  "acl":{
    "logLevel":"{{STRING}}"
  },
  "mediaPlayer":{
   "logLevel":"{{STRING}}"
  },   
  "templateRuntimeCapabilityAgent":{
     "displayCardTTSFinishedTimeout": {{INT}},
     "displayCardAudioPlaybackFinishedTimeout": {{INT}},
     "displayCardAudioPlaybackStoppedPausedTimeout": {{INT}}
  },
  "equalizer":{
     "enabled": {{BOOLEAN}},
     "bands":{
         "BASS": {{BOOLEAN}},
         "MIDRANGE": {{BOOLEAN}},
         "TREBLE": {{BOOLEAN}}
     },
     "modes":{
         "NIGHT": {{BOOLEAN}},
         "MOVIE": {{BOOLEAN}},
         "MUSIC": {{BOOLEAN}},
         "SPORT": {{BOOLEAN}},
         "TV": {{BOOLEAN}}
     },
     "defaultState":{
         "mode": "{{STRING}}",
         "bands":{
             "BASS": {{INT}},
             "MIDRANGE": {{INT}},
             "TREBLE": {{INT}}
         }
     },
     "minLevel": {{INT}},
     "maxLevel": {{INT}},
     "defaultDelta": {{INT}}
  },
  "speakerManagerCapabilityAgent":{
     "minUnmuteVolume": {{INT}}
  }
}
JSON Example
 {
    "cblAuthDelegate":{
        "databaseFilePath":"${SDK_CBL_AUTH_DELEGATE_DATABASE_FILE_PATH}"
    },
    "lwaAuthorization":{
        "databaseFilePath":"${SDK_LWA_AUTHORIZATION_ADAPTER_DATABASE_FILE_PATH}"
    },
    "deviceInfo":{
        "deviceSerialNumber":"${SDK_CONFIG_DEVICE_SERIAL_NUMBER}",
        "clientId":"${SDK_CONFIG_CLIENT_ID}",
        "productId":"${SDK_CONFIG_PRODUCT_ID}",
        "manufacturerName": "${SDK_CONFIG_MANUFACTURER_NAME}",
        "description": "${SDK_CONFIG_DEVICE_DESCRIPTION}"
    },
    "avsGatewayManager":{
        "avsGateway":"https://alexa.na.gateway.devices.a2z.com"
    },
    "capabilitiesDelegate":{
        "databaseFilePath":"${SDK_CAPABILITIES_DELEGATE_DATABASE_FILE_PATH}"
    },
    "miscDatabase":{
        "databaseFilePath":"${SDK_MISC_DATABASE_FILE_PATH}"
    },
    "alertsCapabilityAgent":{
        "databaseFilePath":"${SDK_SQLITE_DATABASE_FILE_PATH}"
    },
    "deviceSettings":{
        "databaseFilePath":"${SDK_SQLITE_DEVICE_SETTINGS_DATABASE_FILE_PATH}",
        "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"],
        "defaultLocale":"en-US",
        "localeCombinations":[
            ["en-CA", "fr-CA"],
            ["fr-CA", "en-CA"]
        ],
        "defaultTimezone":"America/Vancouver"
    },
    "bluetooth" :{
        "databaseFilePath":"${SDK_BLUETOOTH_DATABASE_FILE_PATH}"
    },
    "certifiedSender":{
        "databaseFilePath":"${SDK_CERTIFIED_SENDER_DATABASE_FILE_PATH}"
    },
    "notifications":{
        "databaseFilePath":"${SDK_NOTIFICATIONS_DATABASE_FILE_PATH}"
    },
    "diagnostics":{
        "protocolTraceFromStartup": false,
        "maxTracedMessages":1
    },
    "externalMediaPlayer":{
        "agentString": "CQCAFYNYDC"
    },
    "audioPlayer":{
       "audioMediaPlayerPoolSize": 1
    },
    "sampleApp":{
        "displayCardsSupported":true,
        "firmwareVersion":123,
        "endpoint":"https://alexa.na.gateway.devices.a2z.com",
        "portAudio":{
        "suggestedLatency": 0.150
        }
    },
   "gstreamerMediaPlayer":{
     "outputConversion":{
          "rate":16000,
          "format":"S16LE",
          "channels":1
      },
      "audioSink":"autoaudiosink"
  },
  "libcurlUtils":{
     "CURLOPT_CAPATH":"INSERT_YOUR_CA_CERTIFICATE_PATH_HERE",
     "CURLOPT_INTERFACE":"INSERT_YOUR_INTERFACE_HERE"
  },
  "logging":{
    "logLevel":"INFO"
  },
  "acl":{
    "logLevel":"DEBUG9"
  },
  "mediaPlayer":{
 "logLevel":"INFO"
  },   
  "templateRuntimeCapabilityAgent":{
     "displayCardTTSFinishedTimeout": 2000,
     "displayCardAudioPlaybackFinishedTimeout": 2000,
     "displayCardAudioPlaybackStoppedPausedTimeout": 60000
 },
 "equalizer":{
     "enabled": true,
     "bands":{
         "BASS": true,
         "MIDRANGE": true,
         "TREBLE": true
     },
     "modes":{
         "NIGHT": false,
         "MOVIE": false,
         "MUSIC": false,
         "SPORT": false,
         "TV": false
     },
     "defaultState":{
         "mode": "NONE",
         "bands": {
             "BASS": 0,
             "MIDRANGE": 0,
             "TREBLE": 0
         }
     },
     "minLevel": -6,
     "maxLevel": 6,
     "defaultDelta": 1
 },
 "speakerManagerCapabilityAgent":{
     "minUnmuteVolume": 10
  }
}

Parameters

Parameter Description Value Required?

cblAuthDelegate

An object that contains information about the cblAuthDelegate.

CblAuthDelegate is an implementation of the AuthDelegateInterface that uses the Code-Based Linking authorization process.

object

Yes

cblAuthDelegate.databaseFilePath

Path to the CBLAuthDelegate database file. For example: /home/ubuntu/Build/cblAuthDelegate.db. The specified directory must be valid.

The SampleApp creates the cblAuthDelegate.db file – don't create it yourself. Only use this database file for CBLAuthDelegate, don't use it for other components of SDK.

string

Yes

lwaAuthorization

An object that contains information about the lwaAuthorization component.

object

Yes

lwaAuthorization.databaseFilePath

Path to the lwaAuthorization database file. For example: /home/ubuntu/Build/lwaAuthorization.db. The specified directory must be valid. Only use this database file for lwaAuthorization, don't use it for other components of SDK.

string

No

deviceInfo

An object that contains information about the AVS device.

object

Yes

deviceInfo.deviceSerialNumber

The Device Serial Number (DSN). Use any unique alpha-numeric string up to 64 characters. The DSN helps to identify your product or app instance. For example, 123456.

string

Yes

deviceInfo.clientId

The Client ID for your Product. For more details on generating a clientId a product, see Register a Product.

string

Yes

deviceInfo.productId

The Product ID of your product. For more details on generating a productId a product, see Register a Product.

string

Yes

deviceInfo.manufacturerName

Manufacturer name. Choose any relevant value.

string

Yes

deviceInfo.description

The description of the device. This should contain the manufacturer name or how the device connects.

string

Yes

avsGatewayManager

An object that contains information about how AVS connects to a gateway.

String

No

avsGatewayManager.avsGateway

The URL of the AVS gateway that your device connects to.

Default value: https://alexa.na.gateway.devices.a2z.com

The AVSGatewayManager stores https://alexa.na.gateway.devices.a2z.com in the MiscDB and uses it to establish a connection with AVS. To override the AVSGatewayManager gateway, you might have to delete the AVSGatewayManager table in the MiscDB.

string

No

capabilitiesDelegate

An object that contains information about the capabilitiesDelegate. capabilitiesDelegate provides an implementation of the CapabilitiesDelegateInterface. This allows clients to register capabilities implemented by agents and publish them so that Alexa is aware of the device's capabilities.

object

Yes

capabilitiesDelegate.databaseFilePath

Path to the capabilitiesDelegate database file. The specified directory must be valid. For example: /home/ubuntu/Build/capabilitiesDelegate.db.

The SampleApp creates the capabilitiesDelegate database file – don't create it yourself.

string

Yes

miscDatabase

An object that contains information about the miscDatabase.

object

Yes

miscDatabase.databaseFilePath

Path to the misc database file. The specified directory must be valid. For example: /home/ubuntu/Build/miscDelegate.db.

The SampleApp creates the miscDatabase file – don't create it yourself.

string

Yes

alertsCapabilityAgent

An object that contains information about the alertsCapabilityAgent.

object

Yes

alertsCapabilityAgent.databaseFilePath

Path to the Alerts database file. The specified directory must be valid. For example: /home/ubuntu/Build/alerts.db.

The SampleApp creates the capabilitiesDelegate.db database file – don't create it yourself. Only use this database file for alerts, don't use it for other components of SDK.

string

Yes

deviceSettings

An object that contains information about device settings.

object

Yes

deviceSettings.databaseFilePath

Path to the deviceSettings database file. The specified directory must be valid. For example: /home/ubuntu/Build/deviceSettings.db.

The SampleApp creates the deviceSettings.db database file – don't create it yourself. Only use this database file for device settings, don't use it for other components of SDK.

string

Yes

deviceSettings.locales

A list of supported locales on the device.

Accepted values: 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

list

Yes

deviceSettings.defaultLocale

The default locale of the device. For example, en-US.

string

Yes

deviceSettings.localeCombinations

A list of locale combinations supported on the device. For example, ["en-CA", "fr-CA"],["fr-CA", "en-CA"].

list

Yes

deviceSettings.defaultTimezone

The default timezone of this device. For example, America/Vancouver. If not specified, the device uses the Etc/GMT timezone.

string

Yes

bluetooth

An object that contains information about Bluetooth.

object

Yes

bluetooth.databaseFilePath

Path to Bluetooth database file. The specified directory must be valid. For example: /home/ubuntu/Build/bluetooth.db.

The SampleApp creates the bluetooth.db database file – don't create it yourself. Only use this database file for device settings, don't use it for other components of SDK.

string

Yes

certifiedSender

An object that contains information about certifiedSender.

object

Yes

certifiedSender.databaseFilePath

Path to certified sender database file. The specified directory must be valid. For example: /home/ubuntu/Build/certifiedsender.db.

The SampleApp creates the certifiedsender.db database file – don't create it yourself. Only use this database file for device settings, don't use it for other components of SDK.

string

Yes

notifications

An object that contains information about notifications.

object

Yes

notifications.databaseFilePath

Path to certified sender notifications file. The specified directory must be valid. For example: /home/ubuntu/Build/notifications.db.

The SampleApp creates the certifiedsender.db database file – don't create it yourself. Only use this database file for device settings, don't use it for other components of SDK.

string

Yes

diagnostics

An object that contains information about diagnostics. These tools are available in DEBUG mode only, and must not be enabled in devices built for release.

object

No

diagnostics.protocolTraceFromStartup

Enable protocol tracing when the SDK starts up.

Accepted values: true;false
Default value: false

boolean

No

diagnostics.maxTracedMessages

The maximum number of event or directives to store. If the device exceeds this value, additional messages aren't stored. Default value: 1

int

No

externalMediaPlayer

An object that contains information about ExternalMediaPlayer.

object

No

externalMediaPlayer.agentString

The agent identifier provided by Alexa Music. If you create your adaptors, use the Agent ID assigned to you though Alexa Music.

string

No

audioPlayer

An object that contains information about audioPlayer.

object

No

audioPlayer.audioMediaPlayerPoolSize

The number of MediaPlayer instances that AudioPlayer uses.

Default value 2.

1 results in limited pre-buffering during the introductory Text-To-Speech (TTS), but not the next track.
2 allows the next track to buffer as well.
3 or more allows additional buffering for multiple Play directives. This operation is memory intensive, only use if you expect multiple Play directives to enqueue at the same time.

string

No

sampleApp

An object that contains information about the sample app bundled with the SDK.

object

Yes

sampleApp.displayCardsSupported

Specifies if the SampleApp supports display cards.

Accepted values: true;false

boolean

Yes

sampleApp.firmwareVersion

The firmware version of the device sent in the SoftwareInfo event. The firmware version should be a positive 32-bit integer in the following range: 1-2147483647. For example, 123.

string

No

sampleApp.endpoint

The default connected AVS endpoint. For more details about endpoints and available regions, see AVS API Overview.

string

No

sampleApp.portAudio

An object that contains information about portAudio.

object

No

sampleApp.suggestedLatency

Latency in seconds when opening a PortAudio stream. If this parameter isn't specified, the SampleApp calls Pa_OpenDefaultStream and uses the default value. For more details on the default settings, see the following PortAudio page.

string

No

gstreamerMediaPlayer

An object that contains information about the GStreamer-based MediaPlayer bundled with the SDK. Most platforms automatically set the output GStreamer format correctly, however, your specific hardware might require a different format. The parameters in this object let you manually override the gstreamer defaults.

object

No

gstreamerMediaPlayer.outputConversion

An object that contains information about GStreamer audio settings.

object

No

gstreamerMediaPlayer.outputConversion.rate

The bitrate of the audio output. For example, 1600. For more details on this parameter, see the following GStreamer audio page.

string

No

gstreamerMediaPlayer.outputConversion.format

The format of the audio output. For example, S16LE. For more details on this parameter, see the following GStreamer audio page.

string

No

gstreamerMediaPlayer.outputConversion.channels

The number of supported audio channels. For example, 1. For more details on this parameter, see the following GStreamer audio page.

string

No

gstreamerMediaPlayer.audioSink

The audio sink that GStreamer uses to output sound. By default the SDK uses the autoaudiosink – this automatically selects the best sink to use based. However, sometimes the wrong sink gets selected and prevents audio output. If this happens, specify a different audio sink that works with your hardware and software stack.

string

No

libcurlUtils

An object that contains information about libcurl.

object

No

libcurlUtils.CURLOPT_CAPATH

Configure libcurl to use a different CA certificates directories path. For more details about configuring this parameter, see the following libcurl CAPATH page

object

No

libcurlUtils.CURLOPT_INTERFACE.CURLOPT_CAPATH

Specify a specific outgoing network interface. For more details about configuring this parameter, see the following libcurl interface page

object

No

logging

An object that contains information about logging. Use when the SampleApp isn't working as expected.

To enable DEBUG logging, build the SDK with the CMake parameter -DCMAKE_BUILD_TYPE=DEBUG. By default the SDK builds with the RELEASE build.

There are 14 levels of logging. DEBUG9 provides the highest level of logging and CRITICAL provides the lowest level of logging. For example, if you specific DEBUG9 as the logging level, the sample app displays all logs ranging from DEBUG9 and below. If you specify a logging level of CRITICAL, the sample app only displays CRITICAL logs.

The 14 levels are: DEBUG9, DEBUG8, DEBUG7, DEBUG6, DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, DEBUG0, INFO, WARN, ERROR, CRITICAL.

To selectively see the logging for a particular module, you can specify logging level in this json file. For example, the following example sets a log level for acl and mediaplayer
"acl":{ "logLevel":"DEBUG9" }, "mediaPlayer":{ "logLevel":"INFO" }

string

No

logging.logLevel

Specify a default log level for all ModuleLoggers. If not specified, ModuleLoggers get their log level from the sink logger.

Possible values: DEBUG9, DEBUG8, DEBUG7, DEBUG6, DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, DEBUG0, INFO, WARN, ERROR, CRITICAL.

string

No

templateRuntimeCapabilityAgent

An object that contains information about the templateRuntimeCapabilityAgent.

object

No

templateRuntimeCapabilityAgent.
displayCardTTSFinishedTimeout

Overrides the default timeout for clearing the RenderTemplate display card when SpeechSynthesizer is in a FINISHED state. Specify in milliseconds (ms). For example, 2000.

int

No

templateRuntimeCapabilityAgent.
displayCardAudioPlaybackFinishedTimeout

Overrides the default timeout in milliseconds (ms) for clearing the RenderPlayerInfo display card when AudioPlayer is in FINISHED state. Specify in milliseconds (ms). For example, 2000.

int

No

templateRuntimeCapabilityAgent.
displayCardAudioPlaybackStoppedPausedTimeout

Overrides the default timeout in milliseconds (ms) for clearing the RenderPlayerInfo display card when AudioPlayer is in STOPPED or PAUSED state. Specify in milliseconds (ms). For example, 60000.

string

No

equalizer

An object that contains information about the equalizer. The equalizer allows you to adjust equalizer settings, such as decibel (dB) levels and modes.

object

No

equalizer.enabled

Enables or disables the equalizer. Setting this value to false disables the equalizer locally and reports to AVS that it's disabled.

Accepted values: true;false
Default value: true

boolean

No

equalizer.bands

The equalizer bands supported by the device and their volumes in decibels (db). All bands are active by default. However, if you specify a single band or multiple bands, only those are supported. Use an integer dB value from -6 to 6.

Possible values: BASS,MIDRANGE, TREBLE
Default value: true

boolean

No

equalizer.modes

The equalizer modes supported by the device. AVS doesn't define specific behavior for modes, the EqualizerModeControllerInterface controls these bands.


Accepted values: true;false
Default value: false

Possible values: NIGHT,MOVIE, MUSIC,SPORT, TV

boolean

No

equalizer.defaultState

An object that contains information about the default state of the equalizer. These values are the equalizer's factory settings and are used for a newly registered device or when a user resets a band.

object

No

equalizer.defaultState.mode

The default mode of the equalizer. If you don't want to set a default mode, set the custom value of "NONE".

string

No

equalizer.defaultState.bands

The default band levels and their volume in decibels (db). If you specify a single band or multiple bands, only the specific bands are supported. Use an integer dB value from -6 to 6.

Possible values: BASS,MIDRANGE, TREBLE

int

No

equalizer.minLevel

Minimum value of an equalizer band. Use an integer dB value from -6 to 6.

int

No

equalizer.minLevel

Maximum value an equalizer band has. Use an integer dB value from -6 to 6.

int

No

equalizer.defaultDelta

Default delta value to adjust the equalizer band Use an integer dB value from -6 to 6.

int

No

speakerManagerCapabilityAgent

An object that contains information about the default state of the speakerManagerCapabilityAgent.

object

No

speakerManagerCapabilityAgent.minUnmuteVolume

Overrides the default minUnmuteVolume value. This value determines the volume of a device after it's unmuted. Use any integer between 0 and 10. For example, 5.

int

No