Alexa.StepSpeaker Interface

The StepSpeaker interface provides directives that are used to adjust the volume and mute or unmute a capable audio/video device.

Implement this interface for devices that make incremental discrete step adjustments to volume, where the range of volume isn't known. For example, StepSpeaker can adjust volume by a step of 5, but couldn't adjust the volume to 50 percent. If instead, your device can set or adjust the volume based on any continuous value in a range, implement Speaker.

Directives

The control and query directives in this interface are supported in skills that target the following languages:

  • English - all locales
  • French
  • German
  • Japanese

See Develop Smart Home Skills for Multiple Languages for more information about language support for smart home skills.

AdjustVolume

A request for a relative volume adjustment. The AdjustVolume directive is always relative to the current volume setting and can be positive to increase volume, or negative to reduce volume.

User: Alexa, lower the volume on device

User: Alexa, volume up 20 on device

Example Request:

{
  "directive": {
    "header": {
      "namespace": "Alexa.StepSpeaker",
      "name": "AdjustVolume",
      "messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
      "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token":"access-token-from-skill"
      },
      "endpointId": "<the identifier of the target endpoint>",
      "cookie": {
         
      }
    },
    "payload": {
      "volumeSteps": 20
    }
  }
}

Payload details

Field Description Type Required
volumeSteps A number that indicates how much the volume should be incremented or decremented. integer ranging from -100 to 100. Yes

SetMute

A request to mute or unmute an endpoint.

Example Request:

{
  "directive": {
    "header": {
      "namespace": "Alexa.StepSpeaker",
      "name": "SetMute",
      "messageId": "c8d53423-b49b-48ee-9181-f50acedf2870",
      "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token":"access-token-from-skill"
      },
      "endpointId": "<the identifier of the target endpoint>",
      "cookie": {
         
      }
    },
    "payload": {
      "mute": true
    }
  }
}

Payload details

Field Description Type Required
mute true to indicate the endpoint should be muted. False to indicate that the endpoint should be unmuted. boolean Yes

Properties and Events

For this capability, you must reply:

  • Synchronously, which means you send a Response to Alexa from the Lambda function.

When you send a Response, you should include the state of the interface properties in the context of the message.

Properties

There are no reportable properties currently defined for this interface.

Response

Send an Response event when AdjustVolume or a SetMute directive is successfully handled.

Response example

{
  "context": {
    "properties": [
    ]
  },
  "event": {
    "header": {
      "messageId": "30d2cd1a-ce4f-4542-aa5e-04bd0a6492d5",
      "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
      "name": "Response",
      "payloadVersion": "3"
    },
    "endpoint":{
       "endpointId":"appliance-001"
    },
    "payload":{ }
 }
}

ErrorResponse

You should reply with an error if you cannot complete the customer request for some reason. See Alexa.ErrorResponse for more details.

Additional Sample Code

See the sample request and response messages in the Alexa smart home GitHub repo:

StepSpeaker

Interface Description
Alexa.Speaker Messages for setting volume on a continuous range.