SSML

When you are sending a response to a user, you may not want Alexa to say it in her normal way. Alexa is already pretty smart and handles punctuation, increasing the tone at the end of a question and pausing after a period, but what if you want to have greater control? 

SSML is a standard markup for speech synthesis, and Alexa supports a subset of SSML, allowing the use of 13 different tags. These tags allow you to specify the way that the text is spoken. This means you can add <break time="2s"> into your speech to add a two-second pause, emphasise a section of the speech using <emphasis level="moderate">text to emphasise</emphasis>, or <prosody rate="slow" pitch="-2st">to change the tone and speed,  </prosody>, of the speech.

There are ...

Get Hands-On Chatbot Development with Alexa Skills and Amazon Lex now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.