0

Is there a way to implement a SSML elements to all your intents within a Dialogflow agent? More specifically, I want to add a prosody rate of 108% globally but I don't want to have to go through 5 pages of intents and follow-up intents manually adding the tag to every response. Thanks to anyone who can help.

1 Answers1

1

If you're using a fulfillment webhook you could write a function to add SSML tags to all responses. Please note that the SSML specification only requires the speed attribute work on recorded files (and does not require it work on text to speech voice engines): https://www.w3.org/TR/speech-synthesis11/#S3.3.1.3

On the Google Assistant the following should work with TTS:

<speak>
      <prosody speed="108%">This is being said at 108% speed.</prosody>
</speak>

which means your code should look something like:

ssmlResponse = '<speak><prosody speed="108%">' + response + '</prosody></speak>'

Dialogflow Fulfillment docs: https://dialogflow.com/docs/fulfillment

mattcarrollcode
  • 3,429
  • 16
  • 16
  • Thanks for the answer but with this method wouldn't you need to enable webhook fulfillment for every single intent? – Jason D Feb 05 '18 at 18:54