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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access