O'Reilly logo

Hands-On Chatbot Development with Alexa Skills and Amazon Lex by Sam Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required