Search code examples
amazon-web-servicesalexa-voice-servicealexa-skills-kit

Alexa skill SSML max length


What is the maximum length, or limits of, the SSML attribute in an Amazon Echo Alexa skill JSON response?

"outputSpeech": {
    "type": "SSML",
    "ssml": "<speak>This output speech uses SSML.</speak>"
}

Solution

  • From the JSON interface reference:

    Response Format

    This section documents the format of the response that your service returns. The service for an Alexa skill must send its response in JSON format.

    Note the following size limitations for the response:

    • The outputSpeech response cannot exceed 8000 characters.
    • All of the text included in a card cannot exceed 8000 characters. This includes the title, content, text, and image URLs.
    • An image URL (smallImageUrl or largeImageUrl) cannot exceed 2000 characters.
    • The token included in an audioItem.stream for the AudioPlayer.Play directive cannot exceed 1024 characters.
    • The url included in an audioItem.stream for the AudioPlayer.Play directive cannot exceed 8000 characters.
    • The total size of your response cannot exceed 24 kilobytes.