Today, Amazon announced a new web service named Amazon Polly, which converts text to speech in a number of languages and voices.
Polly is trivial to use for basic text to speech, even from the command line. Polly also has features that allow for more advanced control of the resulting speech including the use of SSML (Speech Synthesis Markup Language). SSML is familiar to folks already developing Alexa Skills for the Amazon Echo family.
This article describes some simple fooling around I did with this new service.
Deliver Amazon Polly Speech By Phone Call With Twilio
I’ve been meaning to develop some voice applications with Twilio, so I took this opportunity to test Twilio phone calls with speech generated by Amazon Polly. The result sounds a lot better than the default Twilio-generated speech.
The basic approach is:
Generate the speech audio using Amazon Polly.
Upload the resulting audio file to S3.
Trigger a phone call with Twilio, pointing it at the audio file to play once the call is connected.
Here are some sample commands to accomplish this: