Amazon Polly – Text-to-Speech
Tags: aws, serverless, devops
Published: 2019-11-14 16:36:21

<span style="font-weight: 400;">Amazon Polly is one of the newer add-ons to the AWS cloud services portfolio. Originally, launched in 2016, this Text-to-Speech (TTS) tool recently received a host of new features. </span>

<span style="font-weight: 400;">As the name suggests, Amazon Polly can effectively convert any written texts to human speech, allowing users to build voice-enabled products, apps, and services. Amazon uses the latest deep learning tech to empower Polly with superior functionality for synthesizing human speech so that it closely resembles the voice of a real human. </span>
<h2><span style="font-weight: 400;">What’s Cool about Amazon Polly? </span></h2>
<b>Neural Text-to-Speech (NTTS) functionality</b>

<span style="font-weight: 400;">Amazon Polly supports a dozen different languages and can re-create a wide array of natural-sounding voice timbres. Amazon Polly is well-articulated and can help you deliver top-notch voice output to your audiences. </span>

<b>Flexible set-up and customization </b>

<span style="font-weight: 400;">You can switch between different voices depending on your needs. The service supports various SSML tags and lexicons. Thus, you can effectively control different speech aspects such as volume, articulation, speed, etc. </span>

<b>Robust API </b>

<span style="font-weight: 400;">Amazon’s APIs are well documented and let you set up integrations in no time. </span>

<b>Comprehensive programming language support </b>

<span style="font-weight: 400;"> </span><span style="font-weight: 400;">Amazon Polly supports all popular coding languages included in SDK and AWS Mobile SDK (iOS / Android). Polly also supports API HTTP.</span>

<b>Affordable Cost </b>

<span style="font-weight: 400;">The service has a pay-per-use pricing model (offers a free tier). You can get a better sense of costs </span><a href="https://aws.amazon.com/polly/pricing/?nc1=h_ls"><span style="font-weight: 400;">here</span></a><span style="font-weight: 400;">. </span>
<h2><span style="font-weight: 400;">Niche Use Cases  </span></h2>
<ul>
 	<li><span style="font-weight: 400;">Audio content creation </span></li>
 	<li><span style="font-weight: 400;">e-Learning </span></li>
 	<li><span style="font-weight: 400;">Telephony</span></li>
</ul>
<iframe src="https://www.youtube.com/embed/4gsx7EeMxWs" width="475" height="292" frameborder="0" allowfullscreen="allowfullscreen"><span data-mce-type="bookmark" style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" class="mce_SELRES_start">﻿</span></iframe>
<h2><span style="font-weight: 400;">Two New Amazon Polly Features Worth of Your Attention </span></h2>
<span style="font-weight: 400;">Polly’s latest add-ons are Newscaster and Neural Text-To-Speech (NTTS).</span>
<ul>
 	<li style="font-weight: 400;"><b>Neural Text-to-Speech (NTTS) </b><span style="font-weight: 400;">enables Amazon Polly to rapidly learn the difference in speech styles and imitate those. As of August 2019, Polly can speak in 11 different voices: 3 British accents and 8 American English accents. In total, Amazon Polly supports 29 languages and lets you use different voices in several of them.</span></li>
 	<li style="font-weight: 400;"><b>Amazon Polly Newscaster </b><span style="font-weight: 400;">closely mimics natural language patterns, so that media publishers can broadcast the new information and original reporting faster. </span></li>
</ul>
<span style="font-weight: 400;">This service is a popular tool among ‘big name’ news companies, as well as some popular language learning applications.  </span>

<span style="font-weight: 400;">For example: </span>
<ul>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">"The Globe and Mail" – a popular Canadian news publisher – was among Newscaster early adopters. </span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">“Gannett Co”., – a US media powerhouse that owns USA Today, along with several other regional papers, also uses Polly. </span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Duolingo – a popular language learning app – uses Amazon Polly for rendering texts in different languages. </span></li>
</ul>
<span style="font-weight: 400;">The Romexsoft team has also used Amazon Polly in one of our recent projects for Trinity Audio. We asked Alex, our Java Team Lead to explain how we incorporate Amazon Polly. </span>
<h2><span style="font-weight: 400;">How Amazon Polly Powers Trinity Player </span></h2>
<span style="font-weight: 400;">"One of the products we have been working on is an audio player that a user can integrate into a web page, and translate all the text into audio (text-to-speech). The player uses Amazon Polly and it's neural net, in particular, to ‘read' the texts out loud in a pleasant voice. Or you can adjust the setting, and make the tone more dramatics with ‘breaking news' reading style.</span>

<span style="font-weight: 400;">Some of the cool Trinity Player features include the ability to translate texts into different languages, display advertising (a major part of our project), plus some additional perks. For instance, to effectively incorporate advertising we use speech marks. These let us estimate when the new sentence begins so that we can incorporate an audio ad without breaking up a sentence.</span>

<span style="font-weight: 400;">Since we are also using Amazon for a multitude of tasks (Translation, Polly, EC2, S3, and a bunch of other services), I always have to pay careful attention to my code quality. Or else a sloppy bug can eat up your entire testing budget in one blink :). </span>

<span style="font-weight: 400;">Trinity Player is a cool product, but it’s more tricky than you might think. I mean, yeah, it looks like an audio player with a 70px UI, how complicated it can be? </span>

<span style="font-weight: 400;">But you constantly need to solve a lot of challenging tasks from a technical standpoint. The product does not have SPA, React, Angular or any other fancy framework. This forces you to think out of the box and work with everything at hand:  OM, CSS selectors, postMessage, audio, NodeJS, DB (Redis, MySQL, memSQL, Presto ), CICD, testing, Docker, etc.</span>

<span style="font-weight: 400;">We also spend a great deal of time testing the app (unit, e2e).</span>

<span style="font-weight: 400;">You are feeling a great deal of responsibility for the product, your code, and the importance of testing because you are developing a product people want to use!"</span><span style="font-weight: 400;">                                             </span>
<p style="text-align: right;"><span style="font-weight: 400;">Alex (Romexsoft  Javascript Team Lead)</span></p>

<h3>How Romexsoft Can Help You?</h3>
As an AWS partner, we provide both <a href="https://www.romexsoft.com/aws-cloud-services/">professional services</a> (cloud migration, cloud solutions, consulting, and cloud-native application development) and <a href="https://www.romexsoft.com/aws-managed-services/">managed AWS services</a>, to reduce costs, improve security and boost operational efficiency

<a href="https://www.romexsoft.com/get-in-touch/">Get in touch</a> with us today to schedule a free consulting session!

Originally published at Romexsoft Blog: https://www.romexsoft.com/blog/amazon-polly-text-to-speech/