Amazon Polly provides an API that enables you to quickly integrate speech synthesis into your application. You simply send the text you want converted into speech to the Amazon Polly API, and Amazon Polly immediately returns the audio stream to your application so your application can begin streaming it directly or store it in a standard audio file format, such as MP3.
|Sampling rate||Sample Code
|"Hi. My name is Joanna."||from boto3 import client
polly = client("polly", region_name="us-east-1")
response = polly.synthesize_speech(
Text="Hi. My name is Joanna.",
Wide Selection of Voices and Languages
Amazon Polly includes dozens of lifelike voices and support for a variety of languages, so you can select the ideal voice and distribute your speech-enabled applications in many countries. In addition to Standard TTS voices, Amazon Polly offers Neural Text-to-Speech (NTTS) voices that improve speech quality for more natural and human-like voices.
|Portuguese - Iberic||Inês||Cristiano|
|Spanish - Castilian||Conchita
|Spanish - Mexican||Mia|
Synchronize Speech for an Enhanced Visual Experience
Amazon Polly makes it easy to request an additional stream of metadata that provides information about when particular sentences, words and sounds are being pronounced. Using this metadata stream alongside the synthesized speech audio stream, you can now build your applications with an enhanced visual experience, such as speech-synchronized facial animation or karaoke-style word highlighting.
Please visit the documentation to learn more about how to use Speech Marks.
Optimize Your Streaming Audio
With Amazon Polly, you can stream all kinds of information through your application to users in near real time. You can also choose from various sampling rates to optimize bandwidth and audio quality for your application. Amazon Polly supports MP3, Vorbis, and raw PCM audio stream formats.
|Sampling rate||MP3 size||OGG size
|24.00 kHz Listen||19.31 kB||18.11 kB||N/A|
|22.05 kHz Listen
||19.33 kB||17.62 kB||N/A|
|16.05 kHz Listen||16.22 kB||15.48 kB||
|8.00 kHz Listen||13.26 kB||9.72 kB||50.34 kB|
Adjust Speaking Style, Speech Rate, Pitch, and Loudness
Amazon Polly supports Speech Synthesis Markup Language (SSML), a W3C standard, XML-based markup language for speech synthesis applications, and supports common SSML tags for phrasing, emphasis, and intonation. Custom Amazon SSML tags provide unique options, such as the ability to make certain voices speak in a Newscaster speaking style. This flexibility helps you create lifelike speech that will attract and hold the attention of your audience.
To learn more, visit the Amazon Polly documentation on SSML tags.
|This is how I speak normally.||(none)
|I can also speak in a Newscaster style, as if I were reading a news article or delivering a flash briefing.||<speak><amazon:domain name="news">I can also speak in a Newscaster style, as if I were reading a news article or delivering a flash briefing.</amazon:domain></speak>|
|I can speak in a higher pitched voice, or I can speak in a lower pitched voice.||<speak>I can speak in a <prosody pitch="high">higher pitched voice</prosody>, or I can speak <prosody pitch="low">in a lower pitched voice</prosody></speak>|
|I can speak really slowly, or I can speak really fast.||<speak>I can speak <prosody rate="x-slow">really slowly</prosody>, or I can speak <prosody rate="x-fast">really fast</prosody></speak>|
|I can also speak very loudly, or I can speak very quietly.||<speak>I can also speak <prosody volume="x-loud">very loudly</prosody>, or I can speak <prosody volume="x-soft">very quietly</prosody>. </speak>|
|I can whisper.||<speak>I have a secret to tell you, I will whisper it to you.<amazon:effect name="whispered">'<prosody rate="x-slow"> <prosody volume="loud">I am not human.</prosody></prosody></amazon:effect>Can you believe it?</speak>|
Newscaster Speaking Style
Amazon Polly can be used to synthesize speech as if it is were spoken by a TV or Radio newscaster. This can be a great way to read news articles or deliver flash briefing updates. The Newscaster style is currently available for the US English (en-US) Matthew and Joanna voices, British English (en-GB) Amy and US Spanish (es-US) Lupe voice using Neural text-to-speech. Listen to an audio sample in US English, British English or US Spanish.
Adjust the Maximum Duration of Speech
Amazon Polly enables you to automatically adjust the speech rate based on a maximum allotted amount of time you define with a feature called time-driven prosody. This is beneficial for many use cases, especially when it comes to localization.
For example, suppose you have US English speech embedded in your training video and want to localize this video into German. Let’s say you translate the text using Amazon Translate and voice it with Polly. It is essential that the localized German speech streams in corresponding frames of the video, so the German speech cannot be longer than the US English speech. You can use this feature to more easily facilitate the dubbing process.
Platform and Programming Language Support
Amazon Polly supports all the programming languages included in the AWS SDK (Java, Node.js, .NET, PHP, Python, Ruby, Go, and C++) and AWS Mobile SDK (iOS/Android). Polly also supports an HTTP API so you can implement your own access layer.
Speech Synthesis via API, Console, or Command Line
Amazon Polly can be accessed via the Polly API (and various language-specific SDKs), AWS Management Console, and the AWS command-line interface (CLI). You have full control over all the capabilities of Amazon Polly, whether you use the service through the console, the API, or the CLI.
With Amazon Polly’s custom lexicons, or vocabularies, you can modify the pronunciation of particular words, such as company names, acronyms, foreign words and neologisms (e.g., “ROTFL”, “C’est la vie” when spoken in a non-French voice). To customize these pronunciations, you upload an XML file with lexical entries. For example, you can customize the pronunciation of Nguyen by providing a phoneme using this XML:
Brand Voice is a custom engagement where you work with the Amazon Polly team to build an Neural Text-to-Speech (NTTS) voice for the exclusive use of your organization. Brand Voice allows you to differentiate your products and applications with a unique vocal identity in a wide variety of use cases, including Amazon Connect and Alexa Skills integrations. We work with you throughout the entire process to identify the persona, identify an actor or actress and record their speech, and ultimately build and train a model to produce the voice. The voice is then made available to your AWS account ID(s).
Listen to National Australia Bank Brand Voice »
If you are interested in building a Brand Voice using Polly, please reach out to your AWS Account Manager or contact us for more information.