Your Alexa Dashboards Settings

Speaker Interface

The Speaker interface exposes directives and events that are used to adjust volume and mute/unmute a client’s speaker. Alexa supports two methods for volume adjustment, which are exposed through the SetVolume and AdjustVolume directives.

SetVolume Directive

This directive instructs your client to make an absolute volume adjustment. The volume value will be between 0 (min) and 100 (max), inclusive.

Sample Message


{
    "directive": {
        "header": {
            "namespace": "Speaker",
            "name": "SetVolume",
            "messageId": "{{STRING}}",
            "dialogRequestId": "{{STRING}}"
        },
        "payload": {
            "volume": {{LONG}}
        }
    }
}

Header Parameters

Parameter Description Type
messageId A unique ID used to represent a specific message. string
dialogRequestId A unique ID used to correlate directives sent in response to a specific Recognize event. string

Payload Parameters

Parameter Description Type
volume The absolute volume level scaled from 0 (min) to 100 (max).
Accepted values: Any value between 0 and 100.
long

AdjustVolume Directive

This directive instructs your client to make a relative volume adjustment. The volume value will be between -100 and 100, inclusive.

The AdjustVolume directive is always relative to the current volume setting and is positive to increase volume, or negative to reduce volume.

Sample Message

{
    "directive": {
        "header": {
            "namespace": "Speaker",
            "name": "AdjustVolume",
            "messageId": "{{STRING}}",
            "dialogRequestId": "{{STRING}}"
        },
        "payload": {
            "volume": {{LONG}}
        }
    }
}

Header Parameters

Parameter Description Type
messageId A unique ID used to represent a specific message. string
dialogRequestId A unique ID used to correlate directives sent in response to a specific Recognize event. string

Payload Parameters

Parameter Description Type
volume The relative volume adjustment. A positive or negative long value used to increase or decrease volume in relation to the current volume setting.
Accepted values: Any value between -100 and 100, inclusive.
long

VolumeChanged Event

The VolumeChanged event must be sent to AVS when:

  • A SetVolume or AdjustVolume directive is received and processed to indicate that the speaker volume on your product has been adjusted/changed.
  • Volume is locally adjusted to indicate that the speaker volume on your product has been adjusted/changed.
    Important: volume must be a value between 0 (min) and 100 (max), inclusive. If your product locally supports volume adjustment from 0 to 10, when the user increases the volume to 8, AVS expects the volume value sent to be 80.

Sample Message

{
    "event": {
        "header": {
            "namespace": "Speaker",
            "name": "VolumeChanged",
            "messageId": "{{STRING}}"
        },
        "payload": {
            "volume": {{LONG}},
            "muted": {{BOOLEAN}}
        }
    }
}

Header Parameters

Parameter Description Type
messageId A unique ID used to represent a specific message. string

Payload Parameters

Parameter Description Type
volume The absolute volume level scaled from 0 (min) to 100 (max).
Accepted values: Any long value between 0 and 100
long
mute A boolean value is used to mute/unmute a product's speaker. The value is true when the speaker is muted, and false when unmuted. boolean

SetMute Directive

This directive is sent from AVS to your client to mute the product’s speaker.

Sample Message

{
    "directive": {
        "header": {
            "namespace": "Speaker",
            "name": "SetMute",
            "messageId": "{{STRING}}",
            "dialogRequestId": "{{STRING}}"
        },
        "payload": {
            "mute": {{BOOLEAN}}
        }
    }
}

Header Parameters

Parameter Description Type
messageId A unique ID used to represent a specific message. string
dialogRequestId A unique ID used to correlate directives sent in response to a specific Recognize event. string

Payload Parameters

Parameter Description Type
mute A boolean value is used to mute/unmute a product's speaker. The value is true when the speaker is muted, and false when unmuted. boolean

MuteChanged Event

The MuteChanged event must be sent to AVS when:

  • A SetMute directive is received and processed to indicate that the mute status of the product’s speaker has changed.
  • Your product is muted/unmuted locally to indicate that the mute status of the product’s speaker has changed.

Sample Message

{
    "event": {
        "header": {
            "namespace": "Speaker",
            "name": "MuteChanged",
            "messageId": "{{STRING}}"
        },
        "payload": {
            "volume": {{LONG}},
            "muted": {{BOOLEAN}}
        }
    }
}

Header Parameters

Parameter Description Type
messageId A unique ID used to represent a specific message. string

Payload Parameters


Accepted values: TRUE or FALSE</td>
Parameter Description Type
volume The absolute volume level scaled from 0 (min) to 100 (max).
Accepted values: Any long value between 0 and 100
long
mute A boolean value is used to mute/unmute a product's speaker. The value is true when the speaker is muted, and false when unmuted.boolean

Additional Interfaces

Jump to the top of this document. Use the sidebar to navigate to additional interfaces.

Resources