SSML and audio integration
Previously, in Chapter 1, Introduction, you used SSML to manipulate tone, rate, and pitch to make speech sound more human. In this section, you will modify the Default Welcome
intent to sound more exciting and also introduce an opening sound, so that when the user first uses the FortuneCookie
, they will hear a thunder sound and then the FortuneCookie
will welcome the user with excitement. Using SSML and sound brings that pop to your application, making it more fun to engage with. You can find more information on SSML that Dialogflow supports at http://bit.ly/2BHBQmq.
Integrating SSML and audio to Default Welcome intent
Previously, Default Welcome
intent simply greeted the user with Hello, Welcome to Henry'
s Fortune Cookie!
by setting fulfillmentText
in the response object. Let's enhance this by using the simpleResponses
object in the fulfillmentMessages
property of the response object. The simpleResponses
object contains properties called ssml
and displayText
. The...