Skip to content

Instantly share code, notes, and snippets.

@kepstein
kepstein / polly.py
Created January 20, 2017 19:01
AWS Polly generates TTS and downloads the result to MP3 using Boto3
#!/usr/bin/python
import boto3
from contextlib import closing
client = boto3.client('polly')
response = client.synthesize_speech(
OutputFormat='mp3',
Text='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. Polly includes 47 lifelike voices spread across 24 languages, so you can select the ideal voice and build speech-enabled applications that work in many different countries.',