Amazon Polly: turns text into lifelike speech

Yesterday at Amazon re:Invent 2016 event a new machine learning service has been presented and made globally available: Polly.
Amazon Polly is a service that turns text into lifelike speech. Polly lets you create applications that talk, enabling you to build entirely new categories of speech-enabled products. Polly is an Amazon AI service that uses advanced deep learning technologies to synthesize speech that sounds like a human voice.
Right now Polly supports 24 languages across 47 different lifelike voices.

The service allows you to create new content for the users and enables new Internet of Things (IoT) use cases by making it easy and inexpensive to add speech to IoT devices.
You can find a set of use cases here: Amazon Polly

You can interact with Polly using the official Boto 3 Python SDK. In case you have an older version of the SDK, you should update it using pip3 –upgrade.

First, create a new Polly client service instance:

To get the list of the available voices, you can use the describe_voices method. You have to specify the language code (e.g.: en-GB, en-US, it-IT) to get the voices Ids and descriptions.

To synthesize a new text, use the method synthesize_speech. You need to specify the text, the output format and the Voice you want to use (by specifying the Id).

Once we have the synthesized text, we can store the stream to a mp3 file.

Here you can find the official Boto3 documentation about Polly: SDK Boto3 Polly
Official AWS post about Polly: AWS Blog – Polly

I am looking forward to see some cool projects made using this news APIs service.