Using Amazon Polly for dynamic prompts

I would like to dynamically generate prompts using Amazon Polly. Does anyone know how I can request a prompt via a text string. I do not want to use the existing Kore Text-to-Speech engine.

One thought is to use a Script node and add JavaScript to construct the text string then make an HttpRequest / HttpResponse to the AWS Polly engine. The response would be the “.WAV” or “.MP3” audio file. I would construct the prompt using SSML so I can insert SSML syntax that is supported by Polly such as “breathing sounds”, emphasis, pause, etc.

Re-posting the response given on the ticket for further reference:

You can code the bot response text like below using Javascript mode.
Have your bot embed such snippet within the VXML it generates.
image

FYI, this is the snippet tested with Nuance TTS.

Let us know if you need any further clarification.

Regards,
Yoga Ramya