Amazon Polly. Developer Guide

Size: px
Start display at page:

Download "Amazon Polly. Developer Guide"

Transcription

1 Amazon Polly Developer Guide

2 Amazon Polly: Developer Guide Copyrigh 2018 Amazon Web Services, Inc. and/or is affiliaes. All righs reserved. Amazon's rademarks and rade dress may no be used in connecion wih any produc or service ha is no Amazon's, in any manner ha is likely o cause confusion among cusomers, or in any manner ha disparages or discredis Amazon. All oher rademarks no owned by Amazon are he propery of heir respecive owners, who may or may no be affiliaed wih, conneced o, or sponsored by Amazon.

3 Table of Conens Wha Is Amazon Polly?... 1 Are You a Firs-ime User of Amazon Polly?... 1 How I Works... 3 Wha's Nex?... 3 Common Quesions... 3 General Quesions... 3 Conen Rendering... 4 Voices... 4 Daa Securiy and Confidenialiy... 5 Geing Sared... 6 Sep 1: Se Up an Accoun & User... 6 Sep 1.1: Sign up for AWS... 6 Sep 1.2: Creae an IAM User... 7 Nex Sep... 7 Sep 2: Geing Sared Using he Console... 7 Exercise 1: Synhesizing Speech Quick Sar (Console)... 8 Exercise 2: Synhesizing Speech (Plain Tex Inpu)... 8 Nex Sep... 9 Sep 3: Geing Sared Using he AWS CLI... 9 Sep 3.1: Se Up he AWS CLI... 9 Sep 3.2: Geing Sared Exercise Wha's Nex? Se Up Pyhon and Tes an Example Speech Marks Speech Mark Types Visemes and Amazon Polly Using Speech Marks Requesing Speech Marks Speech Mark Oupu Speech Mark Examples Requesing Speech Marks Using he Amazon Polly Console Phoneme/Viseme Tables for Suppored Languages Danish (da-dk) Duch (nl-nl) English, Ausralian (en-au) English, Indian (en-in) English, Briish (en-gb) English, American (en-us) English, Welsh (en-gb-wsl) French (fr-fr) French, Canadian (fr-ca) German (de-de) Icelandic (is-is) Ialian (i-it) Japanese (ja-jp) Korean (ko-kr) Norwegian (nb-no) Polish (pl-pl) Poruguese (p-pt) Poruguese, Brazilian (p-br) Romanian (ro-ro) Russian (ru-ru) Spanish (es-es) Spanish, US (es-us) iii

4 Swedish (sv-se) Turkish (r-tr) Welsh (cy-gb) Using SSML Using SSML wih he Console Using SSML wih he Amazon Polly Console Nex Sep Using SSML wih he AWS CLI Example 1: Passing SSML Through he Synhesize-Speech Command Example 2: Synhesizing a Full SSML Documen Example 3: Using Common SSML Tags Example 4: Conrolling he Way Words Are Said SSML Tags in Amazon Polly Suppored SSML Tags <speak> <break> <emphasis> <lang> <mark> <p> <phoneme> <prosody> <s> <say-as> <sub> <w> <amazon:breah> and <amazon:auo-breahs> <amazon:effec name="drc"> <amazon:effec phonaion="sof"> <amazon:effec vocal-rac-lengh> <amazon:effec name="whispered"> Phoneic Tables Used by Amazon Polly Managing Lexicons Applying Muliple Lexicons Managing Lexicons Using he Console Uploading Lexicons Using he Console Applying Lexicons Using he Console (Synhesize Speech) Filering he Lexicon Lis Using he Console Downloading Lexicons Using he Console Deleing a Lexicon Using he Console Managing Lexicons Using he AWS CLI PuLexicon GeLexicon LisLexicons DeleeLexicon Code and Applicaion Examples Sample Code Java Samples Pyhon Samples Example Applicaions Pyhon Example Java Example ios Example Android Example WordPress Plugin Seing Up he Plugin Creae a Permissions Policy iv

5 Creae an IAM User for he Plugin Insalling and Configuring he Plugin Using he Audio Files Posiioning he HTML Player Podcasing wih Amazon Pollycas Amazon Polly Reference Available Voices Languages Suppored by Amazon Polly Limis Suppored Regions Throling Pronunciaion Lexicons SynhesizeSpeech API Operaion Speech Synhesis Markup Language (SSML) CloudTrail Inegraion Amazon Polly Informaion in CloudTrail Undersanding Amazon Polly Log File Enries CloudWach Inegraion Geing CloudWach Merics (Console) Geing CloudWach Merics (CLI) Amazon Polly Merics Dimensions for Amazon Polly Merics API Reference Acions DeleeLexicon DescribeVoices GeLexicon LisLexicons PuLexicon SynhesizeSpeech Daa Types Lexicon LexiconAribues LexiconDescripion Voice Auhenicaion and Access Conrol Auhenicaion Access Conrol Overview of Managing Access Amazon Polly Resources and Operaions Undersanding Resource Ownership Managing Access o Resources Specifying Policy Elemens: Acions, Effecs, and Principals Specifying Condiions in a Policy Using Ideniy-Based Policies (IAM Policies) Permissions Required o Use he Amazon Polly Console AWS Managed (Predefined) Policies for Amazon Polly Cusomer Managed Policy Examples Amazon Polly API Permissions Reference Documen Hisory AWS Glossary v

6 Are You a Firs-ime User of Amazon Polly? Wha Is Amazon Polly? Amazon Polly is a cloud service ha convers ex ino lifelike speech. You can use Amazon Polly o develop applicaions ha increase engagemen and accessibiliy. Amazon Polly suppors muliple languages and includes a variey of lifelike voices, so you can build speech-enabled applicaions ha work in muliple locaions and use he ideal voice for your cusomers. Wih Amazon Polly, you only pay for he ex you synhesize. You can also cache and replay Amazon Polly s generaed speech a no addiional cos. Common use cases for Amazon Polly include, bu are no limied o, mobile applicaions such as newsreaders, games, elearning plaforms, accessibiliy applicaions for visually impaired people, and he rapidly growing segmen of Inerne of Things (IoT). Amazon Polly is cerified for use wih regulaed workloads for HIPAA (he Healh Insurance Porabiliy and Accounabiliy Ac of 1996) and GovCloud. Amazon Polly is no cerified for use wih Paymen Card Indusry Daa Securiy Sandard (PCI DSS) or FedRAMP. Some of he benefis of using Amazon Polly include: High qualiy Amazon Polly uses bes-in-class Tex-o-Speech (TTS) echnology o synhesize naural speech wih high pronunciaion accuracy (including abbreviaions, acronym expansions, dae/ime inerpreaions, and homograph disambiguaion). Low laency Amazon Polly ensures fas response imes, which make i a viable opion for low-laency use cases such as dialog sysems. Suppor for a large porfolio of languages and voices Amazon Polly suppors dozens of voices and muliple languages, offering male and female voice opions for mos languages. Cos-effecive Amazon Polly's pay-per-use model means here are no seup coss. You can sar small and scale up as your applicaion grows. Cloud-based soluion On-device Tex-o-Speech soluions require significan compuing resources, noably CPU power, RAM, and disk space. These can resul in higher developmen coss and higher power consumpion on devices such as ables, smar phones, ec. In conras, Tex-o-Speech conversion done in he cloud dramaically reduces local resource requiremens. This enables suppor of all he available languages and voices a he bes possible qualiy. Moreover, speech improvemens are insanly available o all end-users and do no require addiional updaes for devices. Are You a Firs-ime User of Amazon Polly? If you are a firs-ime user of Amazon Polly, we recommend ha you read he following secions in he lised order: 1. Amazon Polly: How I Works (p. 3) This secion inroduces various Amazon Polly inpus and opions ha you can work wih in order o creae an end-o-end experience. 1

7 Are You a Firs-ime User of Amazon Polly? 2. Geing Sared wih Amazon Polly (p. 6) In his secion, you se up your accoun and es Amazon Polly speech synhesis. 3. Example Applicaions (p. 118) This secion provides addiional examples ha you can use o explore Amazon Polly. 2

8 Wha's Nex? Amazon Polly: How I Works Amazon Polly convers inpu ex ino life-like speech. You jus need o call he SynhesizeSpeech mehod, provide he ex you wish o synhesize, selec one of he available Tex-o-Speech (TTS) voices, and specify an audio oupu forma. Amazon Polly hen synhesizes he provided ex ino a high-qualiy speech audio sream. Inpu ex Provide he ex you wan o synhesize, and Amazon Polly reurns an audio sream. You can provide he inpu as plain ex or in Speech Synhesis Markup Language (SSML) forma. Wih SSML you can conrol various aspecs of speech such as pronunciaion, volume, pich, and speech rae. For more informaion, see Using SSML (p. 76). Available voices Amazon Polly provides a porfolio of muliple languages and a variey of voices. For mos languages you can selec from several differen voices, including boh male and female. You only need o specify he voice name when calling he SynhesizeSpeech operaion, and hen he service uses his voice o conver he ex o speech. Amazon Polly is no a ranslaion service he synhesized speech is in he language of he ex. Numbers using digis (for example, 53, no fifyhree) are synhesized in he language of he voice. Oupu forma Amazon Polly can deliver he synhesized speech in muliple formas. You can selec he audio forma ha suis your needs. For example, you migh reques he speech in he MP3 or Ogg Vorbis forma o consume in web and mobile applicaions. Or, you migh reques he PCM oupu forma for AWS IoT devices and elephony soluions. Wha's Nex? If you are new o Amazon Polly, we recommend ha you o read he following opics in order: Geing Sared wih Amazon Polly (p. 6) Example Applicaions (p. 118) Limis in Amazon Polly (p. 145) Common Quesions This opic provides answers o quesions ha are commonly asked abou Amazon Polly. Topics General Quesions (p. 3) Conen Rendering (p. 4) Voices (p. 4) Daa Securiy and Confidenialiy (p. 5) General Quesions Q: Can I save he synhesized speech? 3

9 Conen Rendering You can save he oupu of he synhesis for use on your own sysem. You can also call Amazon Polly, and hen encryp he file wih any encrypion key and sore i in Amazon Simple Sorage Service (Amazon S3) or any oher secure sorage. The Amazon Polly SynhesizeSpeech call is saeless and is no associaed wih a cusomer ideniy. You can' rerieve i from Amazon Polly laer. Conen Rendering Q: Some of my ex coming ou wih he sress on he wrong syllable when i is spoken by Amazon Polly. I've even ried using an acue accen (U+0301) o mark he sress bu i is sill on he wrong syllable. How can I fix his? Amazon Polly doesn' currenly recognize an acue accen (U+0301) as indicaing syllable sress in a word. However, here are wo ways you can change he sress in a word. You can use an IPA phone and ssml ags o aler he pronunciaion of he word. For more informaion, see SSML Tags in Amazon Polly (p. 83). In some languages, you can also use an aposrophe immediaely afer he syllable o indicae a change in sress. For insance, in Russian, he words стран ы and страны have differen sresses (marked here wih an acue accen). However, because of he idenical spelling, Amazon Polly will pronounce hem boh wih he sress on he final syllable, according o sandard language usage. You can use an aposrophe o mark he alernaively sressed syllable, as in стран'ы, and he Amazon Polly will sress he correc syllable. Q: When I use bulle poins in my ex, Amazon Polly doesn' render hem correcly. I says "minus" every ime i encouners one. Wha do I do? If you use "-" (a hyphen) as a subsiue for a bulle poin, in some languages,amazon Polly renders i as a minus sign. If you wan o use hyphens as subsiues for a bulle poin, you can do so wih a lexicon enry. For more informaion, see Managing Lexicons (p. 99). Q: I use he "/" (forward slash) symbol frequenly in my ex, especially when saying "and/or" and "yes/no." How does Amazon Polly render his? In English, Amazon Polly renders "and/or" in speech as "and or." Currenly, his rule isn' available in oher languages. In languages oher han English, Amazon Polly renders "yes/no" as "yes slash no." If you wan o change his behavior, you can use a lexicon enry. For more informaion, see Managing Lexicons (p. 99). Q: When I use ex from an exising source in order o synhesize speach using he AWS CLI on a Linux machine, some UTF-8 characers do no seem work wih Amazon Polly, even hough he same characers seem o work properly using he Console. Wha is happening? This is based in how he Unix Shell handles Unicode and isn' a Amazon Polly-specific problem. Two opions are available: you can find he problem characers and replace hem in he inpu ex, or you can u ilize an alernae means of accessing Amazon Polly ha does no experience his issue, such as he PHP inerface. This is a known issue ha we are working o address and only a few uncommon unicode characers have his issue. Q: When I ry o synhesize ex from a source conaining Inernaional Phoneic Alphabe (IPA) symbols, Amazon Polly doesn' recognize hem and even ries o pronounce some of hem. How do I fix his? Amazon Polly does no recognize IPA symbols unless SSML (Speech Synhesis Markup Language) is used o delineae i. However, since small secions of IPA symbols usually indicae a pronunciaion guide for a reader, in many cases, his secion can be safely removed from he inpu ex by simple deleion. You can also use a lexicon o change he way his is rendered by Amazon Polly. For more informaion, see Using SSML (p. 76) and Managing Lexicons (p. 99). Voices Q: How can I lisen o a voice o see if I wan o use i? 4

10 Daa Securiy and Confidenialiy You can lisen o any voice suppored by Amazon Polly by synhesizing a shor ex hrough he Amazon Polly console or by using he synhesize-speech API wih he AWS CLI. You can selec any suppored voice in he console and lisen o he voice by running a sample ex. For more informaion, see Exercise 1: Synhesizing Speech Quick Sar (Console) (p. 8). In he AWS CLI, you can use he voice-id of he voice you wan o hear when you run he synhesize-speech API. For more informaion, see Sep 3.2: Geing Sared Exercise Using he AWS CLI (p. 10). Q: How long will he voices be available? If I choose a voice for my applicaion now, will i sill be available in five years? To ensure coninuous suppor for cusomers, we don' plan o reire any voices. This applies o boh currenly available and fuure voices. Daa Securiy and Confidenialiy Q: Can I op ou of reques logging wih reques APIs? Yes, you can reques ha by conacing AWS Suppor. Q: Can I choose o mask cerain daa fields so ha hey are no sored?(for insance, if I conver ex wih some sensiive daa, bu don' wan i sored on he AWS sysems, can I mask i? No. Amazon Polly doesn currenly suppor his funcionaliy. Q: The ex I wan o use wih Amazon Polly is confidenial. How is my daa proeced? All ex submissions are proeced by Secure Sockes Layer (SSL) while in ransi, and are sored using RSA encrypion. We keep he service logs and ex separae, so ha he conen can' be linked wih he cusomer ID. As a resul, Amazon Polly does no associae ex submissions wih cusomer ideniy. Q: How long is daa reained? Amazon Polly reains daa for 14 days. Afer ha, i's auomaically deleed from our sysem. Q: Can I reques ha daa be wiped earlier? Yes, you can reques ha by conacing AWS Suppor. 5

11 Sep 1: Se Up an Accoun & User Geing Sared wih Amazon Polly Amazon Polly provides simple API operaions ha you can easily inegrae wih your exising applicaions. For a lis of suppored operaions, see Acions (p. 152). You can use eiher of he following opions: AWS SDKs When using he SDKs, your requess o Amazon Polly are auomaically signed and auhenicaed using he credenials you provide. This is he recommended choice for building your applicaions. AWS CLI You can use he AWS CLI o access any of Amazon Polly funcionaliy wihou having o wrie any code. The following secions describe how o ge se up and provide an inroducory exercise. Topics Sep 1: Se Up an AWS Accoun and Creae a User (p. 6) Sep 2: Geing Sared Using he Console (p. 7) Sep 3: Geing Sared Using he AWS CLI (p. 9) Wha's Nex? (p. 12) Sep 1: Se Up an AWS Accoun and Creae a User Before you use Amazon Polly for he firs ime, complee he following asks: 1. Sep 1.1: Sign up for AWS (p. 6) 2. Sep 1.2: Creae an IAM User (p. 7) Sep 1.1: Sign up for AWS When you sign up for Amazon Web Services (AWS), your AWS accoun is auomaically signed up for all services in AWS, including Amazon Polly. You are charged only for he services ha you use. Wih Amazon Polly, you pay only for he resources you use. If you are a new AWS cusomer, you can ge sared wih Amazon Polly for free. For more informaion, see AWS Free Usage Tier. If you already have an AWS accoun, skip o he nex sep. If you don' have an AWS accoun, perform he seps in he following procedure o creae one. To creae an AWS accoun 1. Open hps://aws.amazon.com/, and hen choose Creae an AWS Accoun. Noe This migh be unavailable in your browser if you previously signed ino he AWS Managemen Console. In ha case, choose Sign in o a differen accoun, and hen choose Creae a new AWS accoun. 2. Follow he online insrucions. 6

12 Sep 1.2: Creae an IAM User Par of he sign-up procedure involves receiving a phone call and enering a PIN using he phone keypad. Noe your AWS accoun ID because you'll need i for he nex sep. Sep 1.2: Creae an IAM User Services in AWS, such as Amazon Polly, require ha you provide credenials when you access hem so ha he service can deermine wheher you have permissions o access he resources owned by ha service. The console requires your password. You can creae access keys for your AWS accoun o access he AWS CLI or API. However, we don' recommend ha you access AWS using he credenials for your AWS accoun. Insead, we recommend ha you use AWS Ideniy and Access Managemen (IAM). Creae an IAM user, add he user o an IAM group wih adminisraive permissions, and hen gran adminisraive permissions o he IAM user ha you creaed. You can hen access AWS using a special URL and ha IAM user's credenials. If you signed up for AWS, bu you haven' creaed an IAM user for yourself, you can creae one using he IAM console. The Geing Sared exercises in his guide assume ha you have a user (adminuser) wih adminisraor privileges. Follow he procedure o creae adminuser in your accoun. To creae an adminisraor user and sign in o he console 1. Creae an adminisraor user called adminuser in your AWS accoun. For insrucions, see Creaing Your Firs IAM User and Adminisraors Group in he IAM User Guide. 2. A user can sign in o he AWS Managemen Console using a special URL. For more informaion, How Users Sign In o Your Accoun in he IAM User Guide. Imporan The Geing Sared exercises use he adminuser credenials. For added securiy, when building and esing producion applicaion we recommend you creae a service-specific adminisraor user who has permissions for only he Amazon Polly acions. For an example policy ha grans Amazon Polly specific permissions, see Example 1: Allow All Amazon Polly Acions (p. 179). For more informaion abou IAM, see he following: AWS Ideniy and Access Managemen (IAM) Geing Sared IAM User Guide Nex Sep Sep 2: Geing Sared Using he Console (p. 7) Sep 2: Geing Sared Using he Console The Amazon Polly console is he easies way o ge sared esing and using Amazon Polly's speech synhesizing. The Amazon Polly console suppors synhesizing speech from eiher plain ex or SSML inpu. 7

13 Exercise 1: Synhesizing Speech Quick Sar (Console) Topics Exercise 1: Synhesizing Speech Quick Sar (Console) (p. 8) Exercise 2: Synhesizing Speech (Plain Tex Inpu) (p. 8) Nex Sep (p. 9) Exercise 1: Synhesizing Speech Quick Sar (Console) The Quick Sar walks you hrough he fases way o es he Amazon Polly speech synhesis for speech qualiy. When you selec he Tex-o-Speech ab, he ex field for enering your ex is pre-loaded wih example ex so you can quickly ry ou Amazon Polly. To quickly es Amazon Polly 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. Choose he Tex-o-Speech ab. 3. (Opional) Choose SSML. 4. Choose a language and region, hen choose a voice. 5. Choose Lisen o speech. For more in-deph esing, see he following opics: Exercise 2: Synhesizing Speech (Plain Tex Inpu) (p. 8) Using SSML wih he Amazon Polly Console (p. 76) Applying Lexicons Using he Console (Synhesize Speech) (p. 101) Exercise 2: Synhesizing Speech (Plain Tex Inpu) The following procedure synhesizes speech using plain ex inpu. Noe how "W3C" and he dae "10/3" (Ocober 3rd) are synhesized. To synhesize speech using plain ex inpu 1. Afer logging on o he Amazon Polly console, choose Ge sared, and hen choose he Tex-o- Speech ab. 2. Choose he Plain ex ab. 3. Type or pase his ex ino he inpu box. He was caugh up in he game. In he middle of he 10/3/2014 W3C meeing he shoued, "Score!" quie loudly. 4. For Choose a language and region, choose English US, hen choose he voice you wan o use for his ex. 5. To lisen o he speech immediaely, choose Lisen o speech. 6. To save he speech o a file, do one of he following: a. Choose Save speech o MP3. b. To change o a differen file forma, choose Change file forma, choose he file forma you wan, and hen choose Change. 8

14 Nex Sep For more in-deph examples, see he following opics: Applying Lexicons Using he Console (Synhesize Speech) (p. 101) Using SSML wih he Amazon Polly Console (p. 76) Nex Sep Sep 3: Geing Sared Using he AWS CLI (p. 9) Sep 3: Geing Sared Using he AWS CLI Using he AWS CLI you can perform almos all Amazon Polly operaions you can perform using he Amazon Polly console. You canno lisen o he synhesized speech using he AWS CLI. Insead, you mus save i o a file and hen open he file in an applicaion ha can play he file. Topics Sep 3.1: Se Up he AWS Command Line Inerface (AWS CLI) (p. 9) Sep 3.2: Geing Sared Exercise Using he AWS CLI (p. 10) Sep 3.1: Se Up he AWS Command Line Inerface (AWS CLI) Follow he seps o download and configure he AWS Command Line Inerface (AWS CLI). Imporan You don' need he AWS CLI o perform he seps in his Geing Sared exercise. However, some of he exercises in his guide use he AWS CLI. You can skip his sep and go o Sep 3.2: Geing Sared Exercise Using he AWS CLI (p. 10), and hen se up he AWS CLI laer when you need i. To se up he AWS CLI 1. Download and configure he AWS CLI. For insrucions, see he following opics in he AWS Command Line Inerface User Guide: Geing Se Up wih he AWS Command Line Inerface Configuring he AWS Command Line Inerface 2. Add a named profile for he adminisraor user in he AWS CLI config file. You use his profile when execuing he AWS CLI commands. For more informaion abou named profiles, see Named Profiles in he AWS Command Line Inerface User Guide. [profile adminuser] aws_access_key_id = adminuser access key ID aws_secre_access_key = adminuser secre access key region = aws-region For a lis of available AWS Regions and hose suppored by Amazon Polly, see Regions and Endpoins in he Amazon Web Services General Reference. If you specify one of he Amazon Polly suppored regions when you configure he AWS CLI, you can omi he following line from he AWS CLI code examples. If you specify a region no suppored by 9

15 Sep 3.2: Geing Sared Exercise Amazon Polly in your AWS CLI configuraion (for example, if you're an exising AWS cusomer using oher services in regions ha don' suppor Amazon Polly), you mus include he following line: --region polly-suppored-aws-region 3. Verify he seup by yping he following help command a he command promp: aws help A lis of valid AWS commands should appear in he AWS CLI window. To enable Amazon Polly in he AWS CLI (opional) If you have previously downloaded and configured he AWS CLI, Amazon Polly may no be available wihou reconfiguring he AWS CLI. This procedure checks o see if his is necessary and provides insrucions if Amazon Polly is no auomaically available. 1. Verify he availabiliy of Amazon Polly by yping he following help command a he command promp: aws polly help If a descripion of Amazon Polly and a lis of valid commands is displayed, appears in he AWS CLI window. If Amazon Polly is available in he AWS CLI and can be used immediaely. In his case, you can skip he remainder of his procedure. If his is no displayed, coninue wih Sep Use one of he wo following opions o enable Amazon Polly: a. Uninsall and reinsall he AWS CLI. For insrucions, see he following opic in he AWS Command Line Inerface User Guide: Insalling he AWS Command Line Inerface. or b. Download he file service-2.json. A he command promp, run he following: aws configure add-model --service-model file://service-2.json --service-name polly 3. Reverify he availabiliy of Amazon Polly: aws polly help The descripion of Amazon Polly should be visible. Nex Sep Sep 3.2: Geing Sared Exercise Using he AWS CLI (p. 10) Sep 3.2: Geing Sared Exercise Using he AWS CLI Now you can es he speech synhesis offered by Amazon Polly. In his exercise, you call he SynhesizeSpeech operaion by passing in sample ex. You can save he resuling audio as a file and verify is conen. 10

16 Sep 3.2: Geing Sared Exercise If you specified one of he Amazon Polly suppored regions when you configured he AWS CLI, you can omi he following line from he AWS CLI code examples. If you specified a region no suppored by Amazon Polly in your AWS CLI configuraion (for example, if you're an exising AWS cusomer using oher services in regions ha don' suppor Amazon Polly), you mus include he following line: --region polly-suppored-aws-region 1. Run he synhesize-speech AWS CLI command o synhesize sample ex o an audio file (hello.mp3). The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --oupu-forma mp3 \ --voice-id Joanna \ --ex 'Hello, my name is Joanna. I learned abou he W3C on 10/3 of las year.' \ hello.mp3 In he call o synhesize-speech, you provide sample ex for he synhesis, he voice o use (by providing a voice ID, explained in he following sep 3), and he oupu forma. The command saves he resuling audio o he hello.mp3 file. In addiion o he MP3 file, he above operaion produces he following oupu o he console. { } "ConenType": "audio/mpeg", "RequesCharacers": "71" 2. Play he resuling hello.mp3 file o verify he synhesized speech. 3. You can ge he lis of available voices by using he DescribeVoices operaion. Run he following describe-voices AWS CLI command. aws polly describe-voices In response, Amazon Polly reurns he lis of all available voices. For each voice he response provides he following meadaa: voice ID, language code, language name, and he gender of he voice. The following is a sample response: { "Voices": [ { "Gender": "Female", "Name": "Salli", "LanguageName": "US English", "Id": "Salli", "LanguageCode": "en-us" }, { "Gender": "Female", "Name": "Joanna", "LanguageName": "US English", "Id": "Kendra", "LanguageCode": "en-us" } ] 11

17 Wha's Nex? } Opionally, you can specify he language code o find he available voices for a specific language. Amazon Polly suppors dozens of voices. The following example liss all he voices for Brazilian Poruguese. aws polly describe-voices \ --language-code p-br For a lis of language codes, see DescribeVoices (p. 155). These language codes are W3C language idenificaion ags (ISO 639 code for he language name-iso 3166 counry code). For example, en-us (US English), en-gb (Briish English), and es-es (Spanish), ec. You can also use he help opion in he AWS CLI o ge he lis of language codes: aws polly describe-voices help Wha's Nex? This guide provides addiional examples, some of which are Pyhon code examples ha use AWS SDK for Pyhon (Boo) o make API calls o Amazon Polly. We recommend you o se up Pyhon and es he example code provided in he following secion. For addiional examples, see Example Applicaions (p. 118). Se Up Pyhon and Tes an Example To es he Pyhon example code, you need he AWS SDK for Pyhon (Boo). For insrucion, see AWS SDK for Pyhon (Boo3). To es Example Pyhon Code The following Pyhon code example does he following: Uses he AWS SDK for Pyhon (Boo) o send a SynhesizeSpeech reques o Amazon Polly (by providing simple ex as inpu). Accesses he resuling audio sream in he response and saves he audio o a file on your local disk (speech.mp3). Plays he audio file wih he defaul audio player for your local sysem. Save he code o a file (example.py) and run i. """Geing Sared Example for Pyhon 2.7+/3.3+""" from boo3 impor Session from boocore.excepions impor BooCoreError, ClienError from conexlib impor closing impor os impor sys impor subprocess from empfile impor geempdir # Creae a clien using he credenials and region defined in he [adminuser] # secion of he AWS credenials file (~/.aws/credenials). session = Session(profile_name="adminuser") polly = session.clien("polly") 12

18 Se Up Pyhon and Tes an Example ry: # Reques speech synhesis response = polly.synhesize_speech(tex="hello world!", OupuForma="mp3", VoiceId="Joanna") excep (BooCoreError, ClienError) as error: # The service reurned an error, exi gracefully prin(error) sys.exi(-1) # Access he audio sream from he response if "AudioSream" in response: # Noe: Closing he sream is imporan as he service hroles on he # number of parallel connecions. Here we are using conexlib.closing o # ensure he close mehod of he sream objec will be called auomaically # a he end of he wih saemen's scope. wih closing(response["audiosream"]) as sream: oupu = os.pah.join(geempdir(), "speech.mp3") ry: # Open a file for wriing he oupu as a binary sream wih open(oupu, "wb") as file: file.wrie(sream.read()) excep IOError as error: # Could no wrie o file, exi gracefully prin(error) sys.exi(-1) else: # The response didn' conain audio daa, exi gracefully prin("could no sream audio") sys.exi(-1) # Play he audio using he plaform's defaul player if sys.plaform == "win32": os.sarfile(oupu) else: # he following works on Mac and Linux. (Darwin = mac, xdg-open = linux). opener = "open" if sys.plaform == "darwin" else "xdg-open" subprocess.call([opener, oupu]) For addiional examples including an example applicaion, see Example Applicaions (p. 118). 13

19 Speech Mark Types Speech Marks Speech marks are meadaa ha describe he speech ha you synhesize, such as where a senence or word sars and ends in he audio sream. When you reques speech marks for your ex, Amazon Polly reurns his meadaa insead of synhesized speech. By using speech marks in conjuncion wih he synhesized speech audio sream, you can provide your applicaions wih an enhanced visual experience. For example, combining he meadaa wih he audio sream from your ex can enable o you synchronize speech wih facial animaion (lip-syncing) or o highligh wrien words as hey're spoken. Topics Speech Mark Types (p. 14) Using Speech Marks (p. 17) Requesing Speech Marks Using he Amazon Polly Console (p. 20) Phoneme/Viseme Tables for Suppored Languages (p. 20) Speech Mark Types You reques speech marks in he AWS CLI using he speech-mark-ypes opion for he synhesizespeech command. You specify he meadaa elemens ha you wan o reurn from your inpu ex. You can reques as many as four ypes of meadaa bu you mus specify a leas one per reques. No audio oupu is generaed wih he reques. --speech-mark-ypes='["senence", "word", "viseme", "ssml"]' Amazon Polly generaes speech marks using he following elemens: senence Indicaes a senence elemen in he inpu ex. word Indicaes a word elemen in he ex. viseme Describes he face and mouh movemens corresponding o each phoneme being spoken. For more informaion, see Visemes and Amazon Polly (p. 14). ssml Describes a <mark> elemen from he SSML inpu ex. For more informaion, see Using SSML (p. 76). Visemes and Amazon Polly A viseme represens he posiion of he face and mouh when saying a word. I is he visual equivalen of a phoneme, which is he basic acousic uni from which a word is formed. Visemes are he basic visual building blocks of speech. Each language has a se of viseme ha correspond o heir specific phonemes.. In a language, each phoneme has a corresponding viseme ha represens he shape ha he mouh makes when forming he sound. However, no all visemes can be mapped o a paricular phoneme because numerous phonemes appear he same when spoken, even hough hey sound differen. For example, in English, he words "pe" and "be" are acousically differen. However, when observed visually (wihou sound), hey look exacly he same. The following char liss he full se of Inernaional Phoneic Alphabe (IPA) phonemes and he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols as well as heir corresponding visemes for American English language voices. 14

20 Visemes and Amazon Polly IPA X-SAMPA Descripion Example Viseme Consonans b b Voiced bilabial d d Voiced alveolar d ʒ dz Voiced posalveolar affricae ð D Voiced denal f f Voiceless labiodenal bed dig jump hen five p S T f g g Voiced velar game k h h Voiceless gloal house k j j Palaal approximan yes i k k Voiceless velar l l Alveolar laeral approximan ca lay k m m Bilabial nasal mouse p n n Alveolar nasal nap ŋ N Velar nasal hing k p p Voiceless bilabial ɹ r\ Alveolar approximan s s Voiceless alveolar ʃ S Voiceless posalveolar Voiceless alveolar ʃ S Voiceless posalveolar affricae Θ T Voiceless denal v v Voiced labiodenal speak red seem ship rap char hin ves p r s S S T f 15

21 Visemes and Amazon Polly IPA X-SAMPA Descripion Example Viseme w w Labial-velar approximan z z Voiced alveolar ʒ Z Voiced posalveolar Vowels wes zero vision u s S Mid cenral vowel Mid cenral r-colored vowel æ { Near open-fron reader a aɪ ai Diphhong price a aʊ au Diphhong mouh a ɑ A Long open-back faher a eɪ ei Diphhong face e ɝ 3' Open mid-cenral unrounded r-colored vowel ɛ E Open mid-fron i: i Long close fron ɪ I Near-close nearfron unrounded vowel nurse dress fleece ki E E i i oʊ ou Diphhong goa o ɔ O Long open mid-back hough O ɔɪ OI Diphhong choice O u u Long close-back ʊ U Near-close near-back ʌ V Open-mid-back goose foo sru u u E 16

22 Using Speech Marks For all available languages, see Phoneme/Viseme Tables for Suppored Languages (p. 20). Using Speech Marks Requesing Speech Marks To reques speech marks for inpu ex, use he synhesize-speech command. Besides he inpu ex, he following elemens are required o reurn his meadaa: oupu-forma Amazon Polly suppors only he JSON forma when reurning speech marks. --oupu-forma json If you use an unsuppored oupu forma, Amazon Polly hrows an excepion. voice-id To ensure ha he meadaa maches he associaed audio sream, specify he same voice ha is used o generae he synhesized speech audio sream. The available voices don' have idenical speech raes. If you use a voice oher han he one used o generae he speech, he meadaa will no mach he audio sream. --voice-id Joanna speech-mark-ypes Specify he ype or ypes of speech marks you wan. You can reques any or all of he speech mark ypes, bu mus specify a leas one ype. --speech-mark-ypes='["senence", "word", "viseme", "ssml"]' ex-ype Plain ex is he defaul inpu ex for Amazon Polly, so you mus use ex-ype ssml if you wan o reurn SSML speech marks. oufile Specify he oupu file o which he meadaa is wrien. MaryLamb.x The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --oupu-forma json \ --voice-id Voice ID \ --ex 'Inpu ex' \ --speech-mark-ypes='["senence", "word", "viseme"]' \ 17

23 Speech Mark Oupu oufile Speech Mark Oupu Amazon Polly reurns speech mark objecs in a line-delimied JSON sream. A speech mark objec conains he following fields: ime he imesamp in milliseconds from he beginning of he corresponding audio sream ype he ype of speech mark (senence, word, viseme, or ssml). sar he offse in byes of he sar of he objec in he inpu ex (no including viseme marks) end he offse in byes of he objec's end in he inpu ex (no including viseme marks) value his varies depending on he ype of speech mark SSML: <mark> SSML ag viseme: he viseme name word or senence: a subsring of he inpu ex, as delimied by he sar and end fields For example, Amazon Polly generaes he following word speech mark objec from he ex "Mary had a lile lamb": {"ime":373,"ype":"word","sar":5,"end":8,"value":"had"} The described word ("had") begins 373 milliseconds afer he audio sream begins, and sars a bye 5 and ends a bye 8 of he inpu ex. Noe This meadaa is for he Joanna voice-id. If you use anoher voice wih he same inpu ex, he meadaa migh differ. Speech Mark Examples The following examples of speech mark requess show how o make common requess and he oupu ha hey generae. Example 1: Speech Marks Wihou SSML The following example shows you wha requesed meadaa looks like on your screen for he simple senence: "Mary had a lile lamb." For simpliciy, we don' include SSML speech marks in his example. The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --oupu-forma json \ --voice-id Joanna \ --ex 'Mary had a lile lamb.' \ --speech-mark-ypes='["viseme", "word", "senence"]' \ MaryLamb.x When you make his reques, Amazon Polly reurns he following in he.x file: {"ime":0,"ype":"senence","sar":0,"end":23,"value":"mary had a lile lamb."} 18

24 Speech Mark Examples {"ime":6,"ype":"word","sar":0,"end":4,"value":"mary"} {"ime":6,"ype":"viseme","value":"p"} {"ime":73,"ype":"viseme","value":"e"} {"ime":180,"ype":"viseme","value":"r"} {"ime":292,"ype":"viseme","value":"i"} {"ime":373,"ype":"word","sar":5,"end":8,"value":"had"} {"ime":373,"ype":"viseme","value":"k"} {"ime":460,"ype":"viseme","value":"a"} {"ime":521,"ype":"viseme","value":""} {"ime":604,"ype":"word","sar":9,"end":10,"value":"a"} {"ime":643,"ype":"word","sar":11,"end":17,"value":"lile"} {"ime":643,"ype":"viseme","value":""} {"ime":739,"ype":"viseme","value":"i"} {"ime":769,"ype":"viseme","value":""} {"ime":799,"ype":"viseme","value":""} {"ime":882,"ype":"word","sar":18,"end":22,"value":"lamb"} {"ime":882,"ype":"viseme","value":""} {"ime":964,"ype":"viseme","value":"a"} {"ime":1082,"ype":"viseme","value":"p"} In his oupu, each par of he ex is broken ou in erms of speech marks: The senence "Mary had a lile lamb." Each word in he ex: "Mary", "had", "a", "lile", and "lamb." The viseme for each sound in he corresponding audio sream: "p", "E", "r", "i", and so on. For more informaion on visemes see Visemes and Amazon Polly (p. 14). Example 2: Speech Marks wih SSML The process of generaing speech marks from SSML-enhanced ex is similar o he process when SSML is no presen. Use he synhesize-speech command, and specify he SSML-enhanced ex and he ype of speech marks ha you wan, as shown in he following example. To make he example easier o read, we do no include viseme speech marks, bu hese could be included as well. The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --oupu-forma json \ --voice-id Joanna \ --ex-ype ssml \ --ex '<speak><prosody volume="+20db">mary had <break ime="300ms"/>a lile <mark name="animal"/>lamb</prosody></speak>' \ --speech-mark-ypes='["senence", "word", "ssml"]' \ oupu.x When you make his reques, Amazon Polly reurns he following in he.x file: {"ime":0,"ype":"senence","sar":31,"end":95,"value":"mary had <break ime=\"300ms\"\/>a lile <mark name=\"animal\"\/>lamb"} {"ime":6,"ype":"word","sar":31,"end":35,"value":"mary"} {"ime":325,"ype":"word","sar":36,"end":39,"value":"had"} {"ime":897,"ype":"word","sar":40,"end":61,"value":"<break ime=\"300ms\"\/>"} {"ime":1291,"ype":"word","sar":61,"end":62,"value":"a"} {"ime":1373,"ype":"word","sar":63,"end":69,"value":"lile"} {"ime":1635,"ype":"ssml","sar":70,"end":91,"value":"animal"} {"ime":1635,"ype":"word","sar":91,"end":95,"value":"lamb"} 19

25 Requesing Speech Marks Using he Amazon Polly Console Requesing Speech Marks Using he Amazon Polly Console You can use he console o reques speech marks from Amazon Polly. You can hen view he meadaa or save i o a file. To generae speech marks from he Console 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. Choose he Tex-o-Speech ab. 3. Coninue using he Plain Tex ab or choose he SSML ab. 4. Type or pase your ex ino he inpu box. 5. For Language and region, choose he language for your ex. 6. For Voice, choose he voice you wan o use for he ex. 7. To change ex pronunciaion, choose Cusomize Pronunciaion, and for Apply Lexicon choose he desired lexicon. 8. To verify ha he speech is in is final form, choose Lisen o speech. 9. Choose Change File Forma. Noe Downloading MP3, OGG, or PCM formas will no generae speech marks. 10. For File Forma, choose Speech Marks. 11. For Speech Mark Types, choose he ypes of speech marks o generae. The opion o choose SSML meadaa is only available on he SSML ab. For more informaion on using SSML wih Amazon Polly see Using SSML (p. 76). 12. Choose Change. 13. Choose Download Speech Marks. Phoneme/Viseme Tables for Suppored Languages This secion provides phoneme/viseme ables for he languages suppored by Amazon Polly. Topics Danish (da-dk) (p. 21) Duch (nl-nl) (p. 23) English, Ausralian (en-au) (p. 25) English, Indian (en-in) (p. 27) English, Briish (en-gb) (p. 29) English, American (en-us) (p. 32) English, Welsh (en-gb-wsl) (p. 34) French (fr-fr) (p. 36) French, Canadian (fr-ca) (p. 38) German (de-de) (p. 40) Icelandic (is-is) (p. 43) Ialian (i-it) (p. 46) 20

26 Danish (da-dk) Japanese (ja-jp) (p. 47) Korean (ko-kr) (p. 49) Norwegian (nb-no) (p. 51) Polish (pl-pl) (p. 53) Poruguese (p-pt) (p. 55) Poruguese, Brazilian (p-br) (p. 57) Romanian (ro-ro) (p. 59) Russian (ru-ru) (p. 61) Spanish (es-es) (p. 63) Spanish, US (es-us) (p. 66) Swedish (sv-se) (p. 68) Turkish (r-tr) (p. 70) Welsh (cy-gb) (p. 73) Danish (da-dk) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Danish voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar ð D voiced denal f f voiceless labiodenal ba da mad, hriller fa p T f g g voiced velar ga k h h voiceless gloal ha k j j palaal approximan jo i k k voiceless velar l l alveolar laeral approximan ka lad k m m bilabial nasal ma p n n alveolar nasal nay ŋ N velar nasal lang k 21

27 Danish (da-dk) IPA X-SAMPA Descripion Example Viseme p p voiceless bilabial pande p r r alveolar rill hriller, sory r ʁ R voiced uvular s s voiceless alveolar voiceless alveolar v v voiced labiodenal w w labial-velar approximan Vowels ø 2 close-mid fron ø: 2: long close-mid fron ɐ 6 near-open cenral vowel œ 9 open-mid fron œ: 9: long open-mid fron ra sa al va hav, weekend øs øse mor skøn, grøn høne, gøre k s f X o o a O O mid cenral vowel æː {: long near-open fron a a open fron æ { near-open fron ɑ A open back ɑ: A: long open back male man adresse lak, ak rase a a a a a 22

28 Duch (nl-nl) Duch (nl-nl) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Duch voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae f f voiceless labiodenal bak dak manager fel p S f g g voiced velar goal k ɣ G voiced velar hoed k ɦ h\ voiced gloal hand k j j palaal approximan ja i k k voiceless velar l l alveolar laeral approximan kap land k m m bilabial nasal me p n n alveolar nasal ne ŋ N velar nasal bang k p p voiceless bilabial pak p r r alveolar rill rand r s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar v v voiced labiodenal sein show ak vel s S f 23

29 Duch (nl-nl) IPA X-SAMPA Descripion Example Viseme ʋ v\ labiodenal approximan x x voiceless velar z z voiced alveolar ʒ Z voiced posalveolar Vowels øː 2: long close-mid fron wi och ziin bagage neus f k s S o œy 9y diphhong bui O mid cenral vowel a: a: long open fron ɑ: A open back e: e: long close-mid fron ɜː 3: long open-mid cenral unrounded vowel ɛ E open-mid fron baad bad bee barrière bed a a e E E ɛi Ei diphhong bee E i i close fron ɪ I near-close near-fron o: o: long close-mid back ɔ O open-mid back u u close back rounded vowel vier pi boo po hoed i i o O u ʌu Vu diphhong fou E yː y: long close fron fuu u 24

30 English, Ausralian (en-au) IPA X-SAMPA Descripion Example Viseme ʏ Y near-close near-fron hu u English, Ausralian (en-au) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Ausralian English voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae ð D voiced denal f f voiceless labiodenal bed dig jump hen five p S T f g g voiced velar game k h h voiceless gloal house k j j palaal approximan yes i k k voiceless velar l l alveolar laeral approximan l l= syllabic alveolar laeral approximan ca lay bale k m m bilabial nasal mouse p m m= syllabic bilabial nasal anhem p n n alveolar nasal nap n n= syllabic alveolar nasal nap ŋ N velar nasal hing k 25

31 English, Ausralian (en-au) IPA X-SAMPA Descripion Example Viseme p p voiceless bilabial pin p ɹ r\ alveolar approximan red r s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar ʃ S voiceless posalveolar affricae Θ T voiceless denal v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels seem ship ask char hin ves wes zero vision s S S T f u s S mid cenral vowel diphhong æ { near open-fron rap a aɪ ai diphhong price a aʊ au diphhong mouh a ɑː A: long open-back faher a eɪ ei diphhong face e ɜː 3: long open midcenral unrounded vowel ɛ E open mid-fron nurse dress E E ɛə E@ diphhong square E 26

32 English, Indian (en-in) IPA X-SAMPA Descripion Example Viseme i: i long close fron ɪ I near-close near-fron fleece ki i i ɪə I@ diphhong near i ɔː OI long open-mid back hough O ɔɪ OI Diphhong choice O ɒ Q open back rounded vowel u: u: long close-back ʊ U near-close near-back lo goose foo O u u ʊə U@ diphhong cure u ʌ V Open-mid-back sru E English, Indian (en-in) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Indian English voice suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae ð D voiced denal f f voiceless labiodenal bed dig jump hen five p S T f g g voiced velar game k 27

33 English, Indian (en-in) IPA X-SAMPA Descripion Example Viseme h h voiceless gloal house k j j palaal approximan yes i k k voiceless velar l l alveolar laeral approximan l l= syllabic alveolar laeral approximan ca lay bale k m m bilabial nasal mouse p m m= syllabic bilabial nasal anhem p n n alveolar nasal nap n n= syllabic alveolar nasal nap ŋ N velar nasal hing k p p voiceless bilabial pin p ɹ r\ alveolar approximan red r s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar ʃ S voiceless posalveolar affricae Θ T voiceless denal v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels seem ship ask char hin ves wes zero vision s S S T f u s S 28

34 English, Briish (en-gb) IPA X-SAMPA Descripion Example Viseme mid cenral vowel diphhong æ { near open-fron rap a aɪ ai diphhong price a aʊ au diphhong mouh a ɑː A: long open-back faher a eɪ ei diphhong face e ɜː 3: long open midcenral unrounded vowel ɛ E open mid-fron nurse dress E E ɛə E@ diphhong square E i: i long close fron ɪ I near-close near-fron fleece ki i i ɪə I@ diphhong near i ɔː OI long open-mid back hough O ɔɪ OI Diphhong choice O ɒ Q open back rounded vowel u: u: long close-back ʊ U near-close near-back lo goose foo O u u ʊə U@ diphhong cure u ʌ V Open-mid-back sru E English, Briish (en-gb) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Briish English voices ha are suppored by Amazon Polly. 29

35 English, Briish (en-gb) Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae ð D voiced denal f f voiceless labiodenal bed dig jump hen five p S T f g g voiced velar game k h h voiceless gloal house k j j palaal approximan yes i k k voiceless velar l l alveolar laeral approximan l l= syllabic alveolar laeral approximan ca lay bale k m m bilabial nasal mouse p m m= syllabic bilabial nasal anhem p n n alveolar nasal nap n n= syllabic alveolar nasal buon ŋ N velar nasal hing k p p voiceless bilabial pin p ɹ r\ alveolar approximan red r s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar seem ship ask s S 30

36 English, Briish (en-gb) IPA X-SAMPA Descripion Example Viseme ʃ S voiceless posalveolar affricae Θ T voiceless denal v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels char hin ves wes zero vision S T f u s S mid cenral vowel diphhong æ { near open-fron rap a aɪ ai diphhong price a aʊ au diphhong mouh a ɑː A: long open-back faher a eɪ ei diphhong face e ɜː 3: long open midcenral unrounded vowel ɛ E open mid-fron nurse dress E E ɛə E@ diphhong square E i: i long close fron ɪ I near-close near-fron fleece ki i i ɪə I@ diphhong near i ɔː O: long open-mid back hough O ɔɪ OI Diphhong choice O 31

37 English, American (en-us) IPA X-SAMPA Descripion Example Viseme ɒ Q open back rounded vowel u: u: long close-back ʊ U near-close near-back lo goose foo O u u ʊə U@ diphhong cure u ʌ V Open-mid-back sru E English, American (en-us) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he American English voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae ð D voiced denal f f voiceless labiodenal bed dig jump hen five p S T f g g voiced velar game k h h voiceless gloal house k j j palaal approximan yes i k k voiceless velar l l alveolar laeral approximan ca lay k m m bilabial nasal mouse p n n alveolar nasal nap 32

38 English, American (en-us) IPA X-SAMPA Descripion Example Viseme ŋ N velar nasal hing k p p voiceless bilabial speak p ɹ r\ alveolar approximan red r s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar ʃ S voiceless posalveolar affricae Θ T voiceless denal v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels seem ship rap char hin ves wes zero vision s S S T f u s S mid-cenral vowel mid-cenral r- colored vowel æ { near open-fron reader a aɪ ai diphhong price a aʊ au diphhong mouh a ɑ A long open-back faher a eɪ ei diphhong face e ɝ 3' open mid-cenral unrounded r-colored vowel ɛ E open mid-fron nurse dress E E 33

39 English, Welsh (en-gb-wsl) IPA X-SAMPA Descripion Example Viseme i: i long close fron ɪ I near-close near-fron fleece ki i i oʊ ou diphhong goa o ɔ O long open mid-back hough O ɔɪ OI diphhong choice O u u long close-back ʊ U near-close near-back ʌ V open-mid-back goose foo sru u u E English, Welsh (en-gb-wsl) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Welsh English voice suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae ð D voiced denal f f voiceless labiodenal bed dig jump hen five p S T f g g voiced velar game k h h voiceless gloal house k j j palaal approximan yes i 34

40 English, Welsh (en-gb-wsl) IPA X-SAMPA Descripion Example Viseme k k voiceless velar l l alveolar laeral approximan l l= syllabic alveolar laeral approximan ca lay bale k m m bilabial nasal mouse p m m= syllabic bilabial nasal anhem p n n alveolar nasal nap n n= syllabic alveolar nasal nap ŋ N velar nasal hing k p p voiceless bilabial pin p ɹ r\ alveolar approximan red r s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar ʃ S voiceless posalveolar affricae Θ T voiceless denal v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels seem ship ask char hin ves wes zero vision s S S T f u s S mid cenral vowel diphhong 35

41 French (fr-fr) IPA X-SAMPA Descripion Example Viseme æ { near open-fron rap a aɪ ai diphhong price a aʊ au diphhong mouh a ɑː A: long open-back faher a eɪ ei diphhong face e ɜː 3: long open midcenral unrounded vowel ɛ E open mid-fron nurse dress E E ɛə E@ diphhong square E i: i long close fron ɪ I near-close near-fron fleece ki i i ɪə I@ diphhong near i ɔː OI long open-mid back hough O ɔɪ OI Diphhong choice O ɒ Q open back rounded vowel u: u: long close-back ʊ U near-close near-back lo goose foo O u u ʊə U@ diphhong cure u ʌ V Open-mid-back sru E French (fr-fr) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he French voices ha are suppored by Amazon Polly. 36

42 French (fr-fr) Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar f f voiceless labiodenal boire madame femme p f g g voiced velar grand k ɥ H labial-palaal approximan brui u j j palaal approximan meilleur i k k voiceless velar l l alveolar laeral approximan quare malade k m m bilabial nasal maison p n n alveolar nasal asronome ɲ J palaal nasal baigner J ŋ N velar nasal parking k p p voiceless bilabial ʁ R voiced uvular s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar pomme amoureux sané cha éléphone vrai soir raison aubergine p k s S f u s S 37

43 French, Canadian (fr-ca) IPA X-SAMPA Descripion Example Viseme Vowels ø 2 close-mid fron œ 9 open-mid fron œ 9~ nasal open-mid fron deux neuf brun o O O mid cenral vowel a a open fron ɑ A~ nasal open back e e close-mid fron ɛ E open-mid fron ɛ E~ nasal open-mid fron i i close fron o o close-mid back ɔ O open-mid back ɔ O~ nasal open-mid back u u close back rounded vowel y y close fron rounded vowel able camember marché neige sapin mille hôpial homme bon sous dur a a e E E i o O O u u French, Canadian (fr-ca) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he French Canadian voice suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans 38

44 French, Canadian (fr-ca) IPA X-SAMPA Descripion Example Viseme b b voiced bilabial d d voiced alveolar f f voiceless labiodenal boire madame femme p f g g voiced velar grand k ɥ H labial-palaal approximan brui u j j palaal approximan meilleur i k k voiceless velar l l alveolar laeral approximan quare malade k m m bilabial nasal maison p n n alveolar nasal asronome ɲ J palaal nasal baigner J ŋ N velar nasal parking k p p voiceless bilabial ʁ R voiced uvular s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels pomme amoureux sané cha éléphone vrai soir raison aubergine p k s S f u s S 39

45 German (de-de) IPA X-SAMPA Descripion Example Viseme ø 2 close-mid fron œ 9 open-mid fron œ 9~ nasal open-mid fron deux neuf brun o O O mid cenral vowel a a open fron ɑ A~ nasal open back e e close-mid fron ɛ E open-mid fron ɛ E~ nasal open-mid fron i i close fron o o close-mid back ɔ O open-mid back ɔ O~ nasal open-mid back u u close back rounded vowel y y close fron rounded vowel able camember marché neige sapin mille hôpial homme bon sous dur a a e E E i o O O u u German (de-de) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he German voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans ʔ? gloal sop 40

46 German (de-de) IPA X-SAMPA Descripion Example Viseme b b voiced bilabial d d voiced alveolar ç C voiceless palaal d ʒ dz voiced posalveolar affricae f f Voiceless labiodenal Bier Dach ich Dschungel Vogel p k S f g g Voiced velar Gabel k h h Voiceless gloal j j Voiceless gloal k k Voiceless velar l l Alveolar laeral approximan Haus jemand Kleid Loch k i k m m Bilabial nasal Milch p n n Alveolar nasal Naur ŋ N Velar nasal klingen k p p Voiceless bilabial p f pf Voiceless labiodenal affricae Park Apfel p ʀ R Uvular rill Regen s s voiceless alveolar ʃ S Voiceless posalveolar Voiceless alveolar s Ts Voiceless alveolar affricae ʃ S Voiceless posalveolar affricae Messer Fischer Topf Zahl deusch s S T S 41

47 German (de-de) IPA X-SAMPA Descripion Example Viseme v v Voiced labiodenal x x Voiceless velar z z Voiced alveolar ʒ Z Voiced posalveolar Vowels øː 2: long close-mid fron ɐ 6 near-open cenral vowel ɐ 6_^ non-syllabic nearopen cenral vowel œ 9 open-mid fron Wasser kochen See Orange böse besser Klar können f k s S o a a O mid cenral vowel a a open fron a: a: long open fron Salz Sahne a a aɪ ai diphhong nein a aʊ au diphhong Augen a ɑ A~ nasal open back e: e: long close-mid fron ɛ E open-mid fron ɛ E~ nasal open-mid fron i: i: long close fron ɪ I near-close near-fron o: o: long close-mid back Resauran Rede Keller Terrain Lied bie Kohl a e E E i i o 42

48 Icelandic (is-is) IPA X-SAMPA Descripion Example Viseme ɔ O open-mid back ɔ O~ nasal open-mid back Koffer Annonce O O ɔʏ OY diphhong neu O u: u: long close back ʊ U near-close near-back y: y: long close fron ʏ Y near-close near-fron Bruder Wunder kühl Küche u u u u Icelandic (is-is) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Icelandic voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial grasbakkanum 0 c c voiceless palaal cʰ c_h aspiraed voiceless palaal ç C voiceless palaal d d voiced alveolar ð D voiced denal f f voiceless labiodenal pakkin anarkisai héðan bóndi borð duf k k k T f g g voiced velar holgóma k ɣ G voiced velar hugur k 43

49 Icelandic (is-is) IPA X-SAMPA Descripion Example Viseme h h voiceless gloal heili k j j palaal approximan jökull i kʰ k_h aspiraed voiceless velar l l alveolar laeral approximan l l_0 voiceless alveolar laeral approximan ósköpunum gólf fólk k m m bilabial nasal sepember p m m_0 voiceless bilabial nasal kompa p n n alveolar nasal númer n n_0 voiceless alveolar nasal pönun ɲ J palaal nasal pælingar J ŋ N velar nasal söngvarann k ŋ N_0 voiceless velar nasal frænka k pʰ p_h aspiraed voiceless bilabial afplánun p r r alveolar rill afskrifa r r r_0 voiceless alveolar rill s s voiceless alveolar ʰ _h aspiraed voiceless alveolar θ T voiceless denal v v voiced labiodenal w w labial-velar approximan x x voiceless velar Vowels andvörpum baðhús anki þeldökki silfur samfélags r s T f u k 44

50 Icelandic (is-is) IPA X-SAMPA Descripion Example Viseme œ 9 open-mid fron œː 9: long open-mid fron a a open fron a: a: long open fron þröskuldinum vö nefna fara O O a a au au diphhong áa a au: au: diphhong áján a ɛ E open-mid fron ɛ: E: long open-mid fron i i close fron i: i: long close fron ɪ I near-close near-fron ɪ: I: long nearclose near-fron ɔ O open-mid back ɔ: O: long open-mid back kennari dreka Gúlíver þrír samspil sig regndropar ullarbolur E E i i i i O O ɔu Ou diphhong ólf O ɔu: Ou: diphhong fjórir O u u close back rounded vowel u: u: long close back ʏ Y near-close near-fron ʏ: Y long near-close near-fron rounded vowel súlkan frú íu gruninn u u u u 45

51 Ialian (i-it) Ialian (i-it) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Ialian voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d z dz voiced alveolar affricae d ʒ dz voiced posalveolar affricae f f voiceless labiodenal bacca dama zero giro famiglia p s S f g g voiced velar gao k h h voiceless gloal horror k j j palaal approximan dieci i k k voiceless velar l l alveolar laeral approximan ʎ L palaal laeral approximan campo lido aglio k J m m bilabial nasal mille p n n alveolar nasal nove ɲ J palaal nasal lasagne J p p voiceless bilabial pizza p r r alveolar rill risaa r s s voiceless alveolar ʃ S voiceless posalveolar sei scienza s S 46

52 Japanese (ja-jp) IPA X-SAMPA Descripion Example Viseme voiceless alveolar s s voiceless alveolar affricae ʃ S voiceless posalveolar affricae v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels a a open fron e e close-mid fron ɛ E open-mid fron i i close fron o o close-mid back ɔ O open-mid back u u close back rounded vowel avola forza cielo veni quaro bisogno bijou arco re earo impero ceno oo uno s S f u s S a e E i o O u Japanese (ja-jp) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Japanese voice suppored by Amazon Polly. IPA X-SAMPA Descripion Example Viseme Consonans ɾ 4 alveolar flap 練習, renshuu 47

53 Japanese (ja-jp) IPA X-SAMPA Descripion Example Viseme ʔ? gloal sop あつっ, asu' b b voiced bilabial β B voiced bilabial c c voiceless palaal ç C voiceless palaal d d voiced alveolar d ʑ dz\ voiced alveolopalaal affricae 舞踊, buyou ヴィンテージ, vineeji ききょう, kikyou 人, hio 濁点, dakuen 純, jun p B k k J ɡ g voiced velar ご飯, gohan k h h voiceless gloal 本, hon k j j palaal approximan 屋根, yane i ɟ J\ voiced palaal k k voiceless velar 行儀, gyougi 漢字, kanji J k ɺ l\ alveolar laeral flap 釣り, suri r ɺj l\j alveolar laeral flap, palaal approximan 流行, ryuukou r m m bilabial nasal 飯, meshi p n n alveolar nasal 猫, neko ɲ J palaal nasal 日本, nippon J ɴ N\ uvular nasal 缶, kan k p p voiceless bilabial ɸ p\ voiceless bilabial s s voiceless alveolar ɕ s\ voiceless alveolopalaal パン, pan 福, huku 層, sou 書簡, shokan p f s J 48

54 Korean (ko-kr) IPA X-SAMPA Descripion Example Viseme voiceless alveolar s s voiceless alveolar affricae ɕ s\ voiceless alveolopalaal affricae w w labial-velar approximan z z voiced alveolar Vowels äː a:_" long open cenral ä a_" open cenral eː e:_o long mid fron e e_o mid fron unrounded vowel i i close fron iː i: long close fron ɯ M close back ɯː M: long close back oː o:_o long mid back o o_o mid back rounded vowel 手紙, egami 釣り, suri 吉, kichi 電話, denwa 座敷, zashiki 羽蟻, haari 仮名, kana 学生, gakusei 歴, reki 気, ki 詩歌, shiika 運, un 宗教, shuukyou 購読, koodoku 読者, dokusha s J u s i i i i o o Korean (ko-kr) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA)symbols, and he corresponding visemes for he Korean voice suppored by Amazon Polly. IPA X-SAMPA Descripion Example Viseme Consonans 49

55 Korean (ko-kr) IPA X-SAMPA Descripion Example Viseme k k voiceless velar k# k_ srong voiceless velar 강, [g]ang 깨, [kk]e k k n n alveolar nasal 남, [n]am voiceless alveolar # _ srong voiceless alveolar 도, [d]o 때, []e ɾ 4 alveolar flap 사랑, sa[r]ang l l alveolar laeral approximan 돌, do[l] m m bilabial nasal 무, [m]u p p p voiceless bilabial p# p_ srong voiceless bilabial s s voiceless alveolar s# s_ srong voiceless alveolar 봄, [b]om 뻘, [pp]eol 새, [s]e 씨, [ss]i p p s s ŋ N velar nasal 방, ba[ng] k ɕ s\ voiceless alveolopalaal affricae # ɕ s\_ srong voiceless alveolo-palaal affricae ɕʰ s\_h aspiraed voiceless alveolo-palaal affricae kʰ k_h aspiraed voiceless velar ʰ _h aspiraed voiceless alveolar pʰ p_h aspiraed voiceless bilabial h h voiceless gloal 조, [j]o 찌, [jj]i 차, [ch]a 코, [k]o 통, []ong 패, [p]e 힘, [h]im J J J k p k j j palaal approximan 양, [y]ang i 50

56 Norwegian (nb-no) IPA X-SAMPA Descripion Example Viseme w w labial-velar approximan 왕, [w]ang u ɰ M\ velar approximan> 의, [wj]i i Vowels a a open fron ʌ V open-mid back ɛ E open-mid fron o o close-mid back u u close back rounded vowel ɯ M close back i i close fron 밥, b[a]b 정, j[eo]ng 배, b[e] 노, n[o] 둘, d[u]l 은, [eu]n 김, k[i]m a E E o u i i Norwegian (nb-no) The following char liss he full se of Inernaional Phoneic Alphabe (IPA) phonemes and he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols as well as he corresponding visemes as suppored by Amazon Polly for Norwegian language voices. IPA X-SAMPA Descripion Example Viseme Consonans ɾ 4 alveolar flap prøv b b voiced bilabial ç C voiceless palaal d d voiced alveolar ɖ d` voiced reroflex f f voiceless labiodenal labb kino ladd verdi fo p k f ɡ ɡ voiced velar agg k 51

57 Norwegian (nb-no) IPA X-SAMPA Descripion Example Viseme h h voiceless gloal ha k j j palaal approximan gi i k k voiceless velar l l alveolar laeral approximan ɭ l` reroflex laeral approximan akk fall, ball ærlig k m m bilabial nasal lam p n n alveolar nasal vann ɳ n` reroflex nasal garn ŋ N velar nasal sang k p p voiceless bilabial s s voiceless alveolar ʂ s` voiceless reroflex ʃ S voiceless posalveolar voiceless alveolar ʈ ` voiceless reroflex ʋ v\ labiodenal approximan w w labial-velar approximan Vowels øː 2: long close-mid fron œ 9 open-mid fron hopp lass års sky la hard vin will sø sø p s S S f x o O mid cenral vowel æː {: long near-open fron vær a 52

58 Polish (pl-pl) IPA X-SAMPA Descripion Example Viseme ʉ } close cenral ʉː }: long close cenral æ { near-open fron ɑ A open back ɑː A: long open back e: e: long close-mid fron ɛ E open-mid fron i: i: long close fron ɪ I near-close near-fron oː oː long close-mid back ɔ O open-mid back u: u: long close back ʊ U near-close near-back y: y: long close fron ʏ Y near-close near-fron lund lun vær ha ha sen send vin vind vå vå bok bukk lyn lynne u u a a a e E i i o O u u u u Polish (pl-pl) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Polish voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans 53

59 Polish (pl-pl) IPA X-SAMPA Descripion Example Viseme b b voiced bilabial d d voiced alveolar d z dz voiced alveolar affricae d ʑ dz\ voiced alveolopalaal affricae d ʐ dz` voiced reroflex affricae f f voiceless labiodenal bobas, belka dar, do dzwon, widzowie dźwięk dżem, dżungla furka, film p s J S f g g voiced velar gazea, waga k h h voiceless gloal chleb, handel k j j palaal approximan jak, maja i k k voiceless velar l l alveolar laeral approximan kura, marek lipa, alicja k m m bilabial nasal maka, molo p n n alveolar nasal norka ɲ J palaal nasal koń, oruń J p p voiceless bilabial pora, sop p r r alveolar rill rok, park r s s voiceless alveolar ɕ s\ voiceless alveolopalaal ʂ s` voiceless reroflex voiceless alveolar s s voiceless alveolar affricae ɕ s\ voiceless alveolopalaal affricae sum, pas śruba, śnieg szum, masz ok, sół car, co ćma, mieć s J S s J 54

60 Poruguese (p-pt) IPA X-SAMPA Descripion Example Viseme ʂ s` voiceless reroflex affricae v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʑ z\ voiced alveolopalaal ʐ z` voiced reroflex Vowels a a open fron ɛ E open-mid fron ɛ E~ nasal open-mid fron i i close fron ɔ O open-mid back ɔ O~ nasal open-mid back u u close back rounded vowel ɨ 1 close cenral czas, raczej worek, mewa łaska, mało zero źrebię, bieliźnie żar, żona ja echo węże ile oczy wąż ucza byk S f u s J S a E E i O O u i Poruguese (p-pt) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Poruguese voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans ɾ 4 alveolar flap pira 55

61 Poruguese (p-pt) IPA X-SAMPA Descripion Example Viseme b b voiced bilabial d d voiced alveolar f f voiceless labiodenal dao dao faco p f g g voiced velar gao k j j palaal approximan paraguay i k k voiceless velar l l alveolar laeral approximan ʎ L palaal laeral approximan caco galo galho k J m m bilabial nasal mao p n n alveolar nasal nao ɲ J palaal nasal pinha J p p voiceless bilabial pao p ʀ R\ uvular rill barroso k s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels a a open fron saca chao aco vaca mau zaca jaco paro s S f u s S a 56

62 Poruguese, Brazilian (p-br) IPA X-SAMPA Descripion Example Viseme a a~ nasal open fron e e close-mid fron e e~ nasal close-mid fron ɛ E open-mid fron i i close fron ı i~ nasal close fron o o close-mid back o o~ nasal close-mid back ɔ O open-mid back u u close back rounded vowel u u~ nasal close back pega pega movem café linguea cino poder compra coó fui suno a e e E i i o o O u u Poruguese, Brazilian (p-br) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Brazilian Poruguese voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans ɾ 4 alveolar flap pira b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae bao dao idade p S 57

63 Poruguese, Brazilian (p-br) IPA X-SAMPA Descripion Example Viseme f f voiceless labiodenal faco f g g voiced velar gao k j j palaal approximan paraguay i k k voiceless velar l l alveolar laeral approximan ʎ L palaal laeral approximan caco galo galho k J m m bilabial nasal mao p n n alveolar nasal nao ɲ J palaal nasal pinha J p p voiceless bilabial s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar ʃ S voiceless posalveolar affricae v v voiced labiodenal w w labial-velar approximan χ X voiceless uvular z z voiced alveolar ʒ Z voiced posalveolar Vowels a a open fron a a~ nasal open fron pao saca chao aco noie vaca mau carro zaca jaco paro pensamos p s S S f u k s S a a 58

64 Romanian (ro-ro) IPA X-SAMPA Descripion Example Viseme e e close-mid fron e e~ nasal close-mid fron ɛ E open-mid fron i i close fron ı i~ nasal close fron o o close-mid back o o~ nasal close-mid back ɔ O open-mid back u u close back rounded vowel u u~ nasal close back pega movem café linguea cino poder compra coó fui suno e e E i i o o O u u Romanian (ro-ro) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Romanian voice suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae f f voiceless labiodenal bubă după george afacere p S f g g voiced velar agriș k 59

65 Romanian (ro-ro) IPA X-SAMPA Descripion Example Viseme h h voiceless gloal harpă k j j palaal approximan baie i k k voiceless velar l l alveolar laeral approximan coș lampa k m m bilabial nasal mama p n n alveolar nasal nor p p voiceless bilabial pilă p r r alveolar rill rampă r s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar s s voiceless alveolar affricae ʃ S voiceless posalveolar affricae v v voiced labiodenal w w labial-velar approximan z z voiced alveolar ʒ Z voiced posalveolar Vowels soare mașină aa țară ceai viață beau mozol joacă s S s S f u s S mid cenral vowel a a open fron e e close-mid fron casa elan a e 60

66 Russian (ru-ru) IPA X-SAMPA Descripion Example Viseme e e_^ non-syllabic closemid fron unrounded vowel i i close fron o o close-mid back rounded vo beau mie oră e i o oa o_^a diphhong oare o u u close back rounded vowel ɨ 1 close cenral unde România u i Russian (ru-ru) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Russian voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial bʲ b' palaalized voiced bilabial d d voiced alveolar dʲ d' palaalized voiced alveolar f f voiceless labiodenal fʲ f' palaalized voiceless labiodenal борт бюро дом дядя флаг февраль p p f f g g voiced velar нога k ɡʲ g' palaalized voiced velar герой k j j palaal approximan дизайн, ящик i k k voiceless velar кот k 61

67 Russian (ru-ru) IPA X-SAMPA Descripion Example Viseme kʲ k' palaalized voiceless velar l l alveolar laeral approximan lʲ l' palaalized alveolar laeral approximan кино лампа лес k m m bilabial nasal мама p mʲ m' palaalized bilabial nasal мяч p n n alveolar nasal нос nʲ n' palaalized alveolar nasal p p voiceless bilabial pʲ p' palaalized voiceless bilabial няня папа перо p p r r alveolar rill роза r rʲ r' palaalized alveolar rill s s voiceless alveolar sʲ s' palaalized voiceless alveolar ɕ: s\: long voiceless alveolo-palaal ʂ s` voiceless reroflex voiceless alveolar ʲ ' palaalized voiceless alveolar s s voiceless alveolar affricae ɕ s\ voiceless alveolopalaal affricae v v voiced labiodenal рюмка сыр сердце, русь щека шум точка тётя царь час вор r s s J S s J f 62

68 Spanish (es-es) IPA X-SAMPA Descripion Example Viseme vʲ v' palaalized voiced labiodenal x x voiceless velar xʲ x' palaalized voiceless velar z z voiced alveolar zʲ z' palaalized voiced alveolar ʑ: z\: long voiced alveolopalaal ʐ z` voiced reroflex Vowels верфь хор химия зуб зима уезжать жена f k k s s J S mid cenral vowel a a open fron e e close-mid fron ɛ E open-mid fron i i close fron o o close-mid back u u close back rounded vowel ɨ 1 close cenral два, яблоко печь это один, четыре кот муж, вьюга мышь a e E i o u i Spanish (es-es) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Spanish voices ha are suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans 63

69 Spanish (es-es) IPA X-SAMPA Descripion Example Viseme ɾ 4 alveolar flap pero, bravo, amor, eerno b b voiced bilabial β B voiced bilabial d d voiced alveolar ð D voiced denal f f voiceless labiodenal besia bebé cuando arder fase, café p B T f g g voiced velar gao, lengua, guerra k ɣ G voiced velar rigo, Argos k j j palaal approximan hacia, ierra, radio, viuda i ʝ j\ voiced palaal k k voiceless velar l l alveolar laeral approximan ʎ L palaal laeral approximan enhielar, sayo, inyecado, desyerba caña, laca, quisimos lino, calor, principal llave, pollo J k J m m bilabial nasal madre, comer, anfibio p n n alveolar nasal nido, anillo, sin ɲ J palaal nasal cabaña, ñoquis J ŋ N velar nasal cinco, venga k p p voiceless bilabial pozo, opo p r r alveolar rill perro, enrachado r s s voiceless alveolar voiceless alveolar ʃ S voiceless posalveolar affricae saco, casa, pueras amiz, áomo chubasco s S 64

70 Spanish (es-es) IPA X-SAMPA Descripion Example Viseme θ T voiceless denal w w labial-velar approximan x x voiceless velar z z voiced alveolar Vowels a a open fron e e close-mid fron i i close fron o o close-mid back u u close-mid fron e e close-mid fron ɛ E open-mid fron i i close fron i: i: long close fron ɪ I near-close near-fron ɯ M close back o o long close-mid back o: o: long close-mid back u u close back rounded vowel u: u: long close back cereza, zorro, lacero, paz fuego, fuimos, cuoa, cuadro jamón, general, suje, reloj rasgo, mismo anque peso cinco bosque publicar keçi dede bir izah keçi kıl kol dolar durum ruhum T u k s a e i o u e e i i i i o o u u 65

71 Spanish, US (es-us) IPA X-SAMPA Descripion Example Viseme ʊ U near-close near-back Y y close fron rounded vowel ʏ Y near-close near-fron dolu güvenlik aşı u u u Spanish, US (es-us) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he US Spanish voices ha are suppored by Amazon Polly. IPA X-SAMPA Descripion Example Viseme Consonans b b Voiced bilabial d d Voiced alveolar d ʒ dz Voiced posalveolar affricae ð D Voiced denal f f Voiceless labiodenal bed dig jump hen five p S T f g g Voiced velar game k h h Voiceless gloal house k j j Palaal approximan yes i k k Voiceless velar l l Alveolar laeral approximan ca lay k m m Bilabial nasal mouse p n n Alveolar nasal nap ŋ N Velar nasal hing k p p Voiceless bilabial speak p 66

72 Spanish, US (es-us) IPA X-SAMPA Descripion Example Viseme ɹ r\ Alveolar approximan s s Voiceless alveolar ʃ S Voiceless posalveolar Voiceless alveolar ʃ S Voiceless posalveolar affricae Θ T Voiceless denal v v Voiced labiodenal w w Labial-velar approximan z z Voiced alveolar ʒ Z Voiced posalveolar Vowels red seem ship rap char hin ves wes zero vision r s S S T f u s S Mid cenral vowel Mid cenral r-colored vowel æ { Near open-fron reader a aɪ ai Diphhong price a aʊ au Diphhong mouh a ɑ A Long open-back faher a eɪ ei Diphhong face e ɝ 3' Open mid-cenral unrounded r-colored vowel ɛ E Open mid-fron i: i Long close fron nurse dress fleece E E i 67

73 Swedish (sv-se) IPA X-SAMPA Descripion Example Viseme ɪ I Near-close nearfron unrounded vowel ki i oʊ ou Diphhong goa o ɔ O Long open mid-back hough O ɔɪ OI Diphhong choice O u u Long close-back ʊ U Near-close near-back ʌ V Open-mid-back goose foo sru u u E Swedish (sv-se) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Swedish voice suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar ɖ d` voiced reroflex f f voiceless labiodenal bil dal bord fil p f g g voiced velar gås k h h voiceless gloal hal k j j palaal approximan jag i k k voiceless velar l l alveolar laeral approximan kal lös k 68

74 Swedish (sv-se) IPA X-SAMPA Descripion Example Viseme ɭ l` reroflex laeral approximan härlig m m bilabial nasal mil p n n alveolar nasal nålar ɳ n` reroflex nasal barn ŋ N velar nasal ring k p p voiceless bilabial pil p r r alveolar rill ris r s s voiceless alveolar ɕ s\ voiceless alveolopalaal ʂ s` voiceless reroflex voiceless alveolar ʈ ` voiceless reroflex v v voiced labiodenal w w labial-velar approximan ɧ x\ voiceless palaalvelar Vowels ø 2 close-mid fron ø 2: long close-mid fron ɵ 8 close-mid cenral sil jock fors, schlager al hjor vår aula, airways sjuk föll, förr föl, nö, för buss, full s J S f u k o o o mid cenral vowel ʉː }: long close cenral a a open fron hus, ful hall, ma u a 69

75 Turkish (r-tr) IPA X-SAMPA Descripion Example Viseme æ { near-open fron ɑː A: long open back e: e: long close-mid fron ɛ E open-mid fron herr hal, ma ve, hel ve, rä, hea, häll a a e E ɛː E: long open-mid fron i: i: long close fron säl, häl, här E: vi, sil i: ɪ I near-close near-fron o: o: long close-mid back ɔ O open-mid back u: u: long close back ʊ U near-close near-back y y close fron rounded vowel y: y: long close fron vi, sill hål, mål håll, moll sol, bo bo by syl, syl i o O u u u u Turkish (r-tr) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Turkish voice suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans ɾ 4 alveolar flap durum ɾ 4_0_r voiceless fricaed alveolar flap bir ɾ 4_r fricaed alveolar flap raf 70

76 Turkish (r-tr) IPA X-SAMPA Descripion Example Viseme b b voiced bilabial c c voiceless palaal d d voiced alveolar d ʒ dz voiced posalveolar affricae f f voiceless labiodenal raf kedi dede cam fare p k S f g g voiced velar plosiv galibi k h h voiceless gloal hasa k j j palaal approximan ya i ɟ J\ voiced palaal k k voiceless velar l l alveolar laeral approximan ɫ 5 velarized alveolar laeral approximan genç akıl lale labiren J k m m bilabial nasal maaş p n n alveolar nasal anı p p voiceless bilabial s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar ʃ S voiceless posalveolar affricae v v voiced labiodenal z z voiced alveolar ip ses aşı üü çaba ekvaor, kahveci, akvaryum, isveçli, eşviki, cevel ver p s S S f s 71

77 Turkish (r-tr) IPA X-SAMPA Descripion Example Viseme ʒ Z voiced posalveolar Vowels azık S ø 2 close-mid fron göl 0 œ 9 open-mid fron a a open fron a: a: long open fron æ { near-open fron e e close-mid fron ɛ E open-mid fron i i close fron i: i: long close fron ɪ I near-close near-fron ɯ M close back o o close-mid back o: o: long close-mid back u u close back rounded vowel u: u: long close back ʊ U near-close near-back y y close fron rounded vowel ʏ Y near-close near-fron banliyö kal davacı özlem, güvenlik, gürel, somersaul keçi dede bir izah keçi kıl kol dolar durum ruhum dolu güvenlik aşı O a a a e E i i i i o o u u u u u 72

78 Welsh (cy-gb) Welsh (cy-gb) The following able liss he Inernaional Phoneic Alphabe (IPA) phonemes, he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) symbols, and he corresponding visemes for he Welsh voice suppored by Amazon Polly. Phoneme/Viseme Table IPA X-SAMPA Descripion Example Viseme Consonans b b voiced bilabial d d voiced alveolar d ʒ dz voiced posalveolar affricae ð D voiced denal f f voiceless labiodenal baban deg garej deuddeg ffacs p S T f g g voiced velar gadael k h h voiceless gloal haearn k j j palaal approximan asudio i k k voiceless velar l l alveolar laeral approximan ɬ K voiceless alveolar laeral can lan llan k m m bilabial nasal mae p m m_0 voiceless bilabial nasal ymhen p n n alveolar nasal naw n n_0 voiceless alveolar nasal anhawser ŋ N velar nasal argyfwng k ŋ N_0 voiceless velar nasal anghenion k p p voiceless bilabial pump p r r alveolar rill rhoi r 73

79 Welsh (cy-gb) IPA X-SAMPA Descripion Example Viseme r r_0 voiceless alveolar rill s s voiceless alveolar ʃ S voiceless posalveolar voiceless alveolar ʃ S voiceless posalveolar affricae θ T voiceless denal v v voiced labiodenal w w labial-velar approximan χ X voiceless uvular z z voiced alveolar ʒ Z voiced posalveolar Vowels garw saih siawns egan cysain aberh prawf rhagweld chwech aids rouge r s S S T f u k s S mid cenral vowel a a open fron acen a ai ai diphhong dau a au au diphhong awdur a ɑː A: long open back mab a ɑːɨ A:1 diphhong aelod a e: e: long close-mid fron ɛ E open-mid fron peh pedwar e E ɛi Ei diphhong beic E i: i: long close fron ri i 74

80 Welsh (cy-gb) IPA X-SAMPA Descripion Example Viseme ɪ I near-close near-fron miliwn i ɨu 1u diphhong unigryw i o: o: long close-mid back ɔ O open-mid back oddi oddieihr o O ɔi Oi diphhong roi O ɔu Ou diphhong rownd O u: u: long close back ʊ U near-close near-back cwch acwsig u u ʊi Ui diphhong wyh u 75

81 Using SSML wih he Console Using SSML Amazon Polly generaes speech from boh plain ex inpu and Speech Synhesis Markup Language (SSML) documens ha conform o SSML version 1.1. Using SSML ags, you can cusomize and conrol aspecs of speech such as pronunciaion, volume, and speech rae. Amazon Polly suppors SSML 1.1 as defined in he following W3C recommendaion: Speech Synhesis Markup Language (SSML) Version 1.1, W3C Recommendaion 7 Sepember 2010 Some of he elemens in he SSML W3C recommendaion are no suppored. For more informaion, see Limis in Amazon Polly (p. 145). This secion provides simple examples of SSML ha can be used o generae and conrol speech oupu. The examples also provide he synhesize-speech AWS CLI command o es hese examples. Topics Using SSML wih he Amazon Polly Console (p. 76) Using SSML wih he AWS CLI (p. 77) SSML Tags in Amazon Polly (p. 83) Using SSML wih he Amazon Polly Console Amazon Polly suppors version 1.1 SSML as defined by he W3C. This secion covers how o use SSML inpu for speech synhesis in he Amazon Polly console. Using SSML wih he Amazon Polly Console The following procedure synhesizes speech using SSML inpu. Excep for seps 3 and 4 below, he seps in his example are idenical o hose in Exercise 2: Synhesizing Speech (Plain Tex Inpu) (p. 8). To synhesize speech using he Amazon Polly console (SSML inpu) In his example, you use SSML agging o subsiue "World Wide Web Consorium" for "W3C". Compare he resuls of his exercise wih ha of Applying Lexicons Using he Console (Synhesize Speech) (p. 101) for boh US English and anoher language. 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. If needed, choose he Tex-o-Speech ab. 3. Choose he SSML ab. 4. Type or pase he following ex in he ex box: <speak> He was caugh up in he game.<break ime="1s"/> In he middle of he 10/3/2014 <sub alias="world Wide Web Consorium">W3C</sub> meeing he shoued, "Score!" quie loudly. When his boss sared a him, he repeaed <amazon:effec name="whispered">"score"</amazon:effec> in a whisper. </speak> The SSML ags inform Amazon Polly ha he ex should be rendered in a specified way. 76

82 Nex Sep <break ime="1s"/> insrucs Amazon Polly o pause 1 second beween he iniial wo senences. <sub alias="world Wide Web Consorium">W3C</sub> insrucs Amazon Polly o subsiue "World Wide Web Consorium" for he acronym "W3C". <amazon:effec name="whispered">score</amazon:effec> insrucs Amazon Polly o say he second "Score" in a whispered voice. For more informaion on SSML wih examples, see Suppored SSML Tags (p. 83) 5. For Choose a language and region, choose English US, hen choose he voice you wan. 6. To lisen o he speech immediaely, choose Lisen o speech. 7. To save he speech file, choose Download [forma] if he forma is he one you wan. Oherwise choose Change file forma, choose he forma you wan, and hen choose Change. Choose Download [forma]. Relaed Console Examples Exercise 2: Synhesizing Speech (Plain Tex Inpu) (p. 8) Applying Lexicons Using he Console (Synhesize Speech) (p. 101) Noe When enering he inpu ex in he AWS CLI, quoaion marks are used around he inpu ex o differeniae i from he surrounding code. Because he Amazon Polly console does no show you he code, quoaion marks are no used around he inpu ex in he console. Nex Sep Applying Lexicons Using he Console (Synhesize Speech) (p. 101) Using SSML wih he AWS CLI The following opics demonsrae how o use SSML inpu wih he AWS CLI for Amazon Polly. Example 1: Passing SSML Through he Synhesize- Speech Command In he following synhesize-speech command, you specify a simple SSML sring wih only he required opening and closing <speak></speak> ags and he quoaion marks ha surround hem. (Opionally, you can specify he full documen header oo). Because plain ex is he defaul, he command also specifies he --ex-ype parameer o indicae ha he inpu ex is SSML. The only required elemens for an SSML sring are he inpu ex (argeed by he generaed speech), oupuforma, and voice-id. Imporan Alhough you don' use quoaion marks around inpu ex in he Amazon Polly console, hey are required when using he AWS CLI or oher code. This is rue for boh for plain ex and SSML. 's imporan ha he quoaion marks surround he enire inpu ex and ha you differeniae he quoaion marks wihin he ex. For example, you can use single quoe marks (') surrounding he enire inpu ex, and sandard quoaion marks (") in any inerior ags or use he reverse. (When using he AWS CLI, boh 77

83 Example 2: Synhesizing a Full SSML Documen opions work for Unix, Linux, and macos. Sandard quoaions marks for he inpu ex and single quoe marks for inerior ags are required when using a Windows command promp. Thus you can use eiher of he following formas: --ex '<speak>hello <break ime="300ms"/> World</speak>' --ex "<speak>hello <break ime='300ms'/> World</speak>" The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak>hello world</speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 Play he resuling speech.mp3 file o verify he synhesized speech. Example 2: Synhesizing a Full SSML Documen In his example, you save SSML conen o a file and specify he file name in he synhesize-speech command. This example uses he following SSML: <?xml version="1.0"?> <speak version="1.1" xmlns="hp:// xmlns:xsi="hp:// xsi:schemalocaion="hp:// hp:// xml:lang="en-us">hello World</speak> The xml:lang aribue specifies en-us (US English) as he language of he inpu ex. For informaion abou how he language of he inpu ex and he language of he voice seleced affec he SynhesizeSpeech operaion, see Using he xml:lang Aribue (p. 82). To es he SSML 1. Save he SSML o a file (example.xml). 2. Run he following synhesize-speech command from he pah where he XML file is sored and specify he SSML as inpu. Because his poins o a file insead of conaining he acual inpu ex, no quoaion marks are needed. The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex file://example.xml \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 78

84 Example 3: Using Common SSML Tags 3. Play he speech.mp3 file o verify he synhesized speech. Example 3: Using Common SSML Tags This secion explains how o use some common SSML ags o achieve specific resuls. For more examples, see Speech Synhesis Markup Language (SSML) Version 1.1. You can use he synhesize-speech command o es he examples in his secion. Using he <break> Elemen The following SSML synhesize-speech command uses he <break> elemen o add a 300- millisecond delay beween he words "Hello" and "World" in he resuling speech: <speak> Hello <break ime="300ms"/> World. </speak> The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak>hello <break ime="300ms"/> World</speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 Play he resuling speech.mp3 file o verify he synhesized speech. Using he <prosody> Elemen Use he <prosody> elemen o conrol pich, speaking rae, and volume of speech. The following SSML uses he <prosody> elemen o conrol volume: <speak> <prosody volume="+20db">hello world</prosody> </speak> The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak><prosody volume="+20db">hello world</prosody></speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 The following SSML uses he <prosody> elemen o conrol pich: <speak> <prosody pich="x-high">hello world.</prosody> 79

85 Example 3: Using Common SSML Tags </speak> The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak><prosody pich="x-high">hello world</prosody></speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 The following SSML uses he <prosody> elemen o specify he speech rae: <speak> <prosody rae="x-fas">hello world.</prosody> </speak> The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak><prosody rae="x-fas">hello world</prosody></speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 You can specify muliple aribues in a <prosody> elemen, as shown in he following example: <speak> <prosody volume="x-loud" pich="x-high" rae="x-fas">hello world.</prosody> </speak> The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak><prosody volume="x-loud" pich="x-high" rae="x-fas">hello world</ prosody></speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 Play he resuling speech.mp3 file o verify he synhesized speech. Using a whispered voice The following synhesize-speech command uses he <amazon:effec name="whispered"> elemen o say he words "lile lamb" in a whispered voice in he resuling speech: <speak> 80

86 Example 4: Conrolling he Way Words Are Said Mary has a <amazon:effec name="whispered">lile lamb.</amazon:effec> </speak> This effec can be enhanced by slowing he whispered speech slighly using he <prosody> elemen. The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak> Mary has a <prosody rae="-10%"><amazon:effec name="whispered"> \ lile lamb.</amazon:effec></prosody></speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 Play he resuling speech.mp3 file o verify he synhesized speech. Using he <emphasis> Elemen Use he <emphasis> elemen o specify he sress or prominence o apply when speaking a specified word or phrase. <speak> <emphasis level="srong">hello</emphasis> world how are you? </speak> The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak><emphasis level="srong">hello</emphasis> world how are you?</speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 Play he resuling speech.mp3 file o verify he synhesized speech. Example 4: Conrolling he Way Words Are Said This example explains some of he common SSML ags you can use o conrol he way Amazon Polly says cerain words. Amazon Polly inerpres he words in a paricular way or by how hey're pronounced. Using he <say-as> Elemen The <say-as> elemen enables you o provide informaion abou he ype of ex conained wihin he elemen. For insance, in he following SSML, <say-as> indicaes ha he ex 4/6 should be inerpreed in a specific way. The aribue inerpre-as="dae" forma="dm" indicaes i should be said as a dae value wih he forma monh/day. 81

87 Example 4: Conrolling he Way Words Are Said <speak> Today is <say-as inerpre-as="dae" forma="md" >4/6</say-as> </speak> This elemen can also be used o say fracions, elephone numbers, measuremen unis, and more. The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak>today is <say-as inerpre-as="dae" forma="md" >4/6</say-as></speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 The resuling speech says "Today is June 4h". The <say-as> ag describes how he ex should be inerpreed by providing addiional conex via he inerpre-as aribue. Play he resuling speech.mp3 file o verify he synhesized speech. For more informaion on his elemen, see <say-as> (p. 88). Using he xml:lang Aribue You can improve he pronunciaion of words ha are foreign o he inpu ex language by specifying he arge language using he xml:lang aribue. This forces he TTS engine o apply differen pronunciaion rules for he words ha are specific o he arge language. The examples below show differen combinaions of languages for he inpu ex and he voices you can specify in he synhesize-speech call. You can es hese examples using he synhesize-speech command o verify he resuls. For a complee lis of which languages are available, see Languages Suppored by Amazon Polly (p. 143). In his example, he chosen voice is a US English voice. Amazon Polly assumes ha he inpu ex is in he same language as he seleced voice. To achieve a Spanish pronunciaion of specific words, you need o mark he argeed words as Spanish. aws polly synhesize-speech \ --ex-ype ssml \ --ex '<speak>tha resauran is errific. <lang xml:lang="es-es">mucho guso.</lang></ speak>' \ --oupu-forma mp3 \ --voice-id Joanna \ speech.mp3 Because he language of he inpu ex is specified, Amazon Polly maps he resuling Spanish phonemes o English phonemes of he smalles acousic disance. As a resul, Salli reads he ex as a US naive speaker who knows he correc Spanish pronunciaion, bu in a US English accen. Noe This pracice is limied o pairs of languages available in he Amazon Polly language porfolio. Some language pairs work beer han ohers because of he phonological srucure of he languages. 82

88 SSML Tags in Amazon Polly Play he resuling speech.mp3 file o lisen o he synhesized speech. SSML Tags in Amazon Polly Using SSML-enhanced inpu ex enables you o exer addiional conrol over how Amazon Polly generaes speech from he ex you provide. For example, you can include a long pause wihin your ex, or aler i in anoher way such as changing he speech rae or pich. Amazon Polly provides his ype of conrol and more wih a subse of he SSML markup ags as defined by he Speech Synhesis Markup Language (SSML) Version 1.1, W3C Recommendaion Suppored SSML Tags Amazon Polly suppors he following SSML: roo <speak> (p. 83) sandard ags <break> (p. 84) <emphasis> (p. 84) <lang> (p. 85) <mark> (p. 86) <p> (p. 86) <phoneme> (p. 86) <prosody> (p. 87) <s> (p. 87) <say-as> (p. 88) <sub> (p. 89) <w> (p. 90) Amazon Polly-specific ags <amazon:breah> and <amazon:auo-breahs> (p. 90) <amazon:effec name="drc"> (p. 93) <amazon:effec phonaion="sof"> (p. 95) <amazon:effec vocal-rac-lengh> (p. 95) <amazon:effec name="whispered"> (p. 96) Amazon Polly ignores unsuppored SSML ags in your inpu ex when i processes he ex. <speak> The <speak> ag is he roo elemen of all Amazon Polly SSML ex. You mus include all SSMLenhanced ex o be spoken wihin his ag. 83

89 <break> <speak>mary had a lile lamb.</speak> <break> This ag indicaes a pause in he speech. The lengh of he pause can be se wih eiher a srengh or ime aribue. If no aribue is used wih a break ag, he defaul <break srengh="medium"> is used. The following values can be used wih he srengh aribue: none: No pause occurs. This can be used o remove a pause ha would normally occur (such as afer a period). x-weak: Same as none. weak: Treas adjacen words as if hey are separaed by a single comma. medium: Same as weak. srong: Treas adjacen words as if hey are separaed by a senence break (equivalen o he <s> ag). x-srong: Treas adjacen words as if hey are separaed by a paragraph break (equivalen o he <p> ag). The following values can be used wih he ime aribue: s: Duraion of he pause in seconds. A pause may be up o 10s in duraion. ms: Duraion of he pause in milliseconds. A pause may be up o 10000ms. For example: <speak> Mary had a lile lamb <break ime="3s"/>whose fleece was whie as snow. </speak> <emphasis> The <emphasis> ag emphasizes he agged words or phrases. Emphasizing ex changes he rae and volume of he speech. More emphasis means ha he ex is spoken louder and slower. Less emphasis is quieer and faser. The level aribue indicaes he degree of emphasis ha you wan o place on he ex. Three level opions are available: Srong: Increases he volume and slows down speaking rae so he speech is louder and slower. Moderae: Increases he volume and slows down he speaking rae, bu less so han when se o srong. This is he defaul and is used if no level is provided. Reduced: Decrease he volume and speed up he speaking rae. The speech is sofer and faser. Noe The normal speaking rae and volume for a given voice falls beween he moderae and reduced levels. For example: 84

90 <lang> <speak> I already old you I <emphasis level="srong">really like</emphasis> ha person. </speak> <lang> This ag indicaes he language of a specific word or phrase. Foreign language words and phrases are generally rendered beer audibly when hey are enclosed in inside a <lang> ag. The language in which you wan o render he pronunciaion mus be specified using he xml:lang aribue. For a complee lis of which languages are available, see Languages Suppored by Amazon Polly (p. 143). The acual language in which he word or phrase is rendered is he language of he voice-id used, and no he language of he <lang> ag. The ag serves only o se he pronunciaion of he ex, when i is differen from he language of he voice-id. For example: When he voice-id is Joanna (American English), run he following: <speak> Je ne parle pas français. </speak> Amazon Polly says his in he Joanna voice wihou aemping o use a French accen. When he same voice is used wih he following <lang> ab: <speak> <lang xml:lang="fr-fr">je ne parle pas français.</lang>. </speak> Amazon Polly pronounces his in he Joanna voice using American-accened French. However, because Joanna is no a naive French voice, pronunciaion is based on he language he voice speaks naively. For example, alhough a perfec French pronunciaion would feaure an uvual rill /R/ in he word adore, Joanna's American English voice pronounces i as he corresponding sound /r/. In anoher, when he voice-id of Giorgio (Ialian) is used wih he following ex: <speak> Mi piace Bruce Springseen. </speak> Amazon Polly says his in he Giorgio voice wih no aemp o use a non-ialian pronunciaion. When he same voice is used wih he following <lang> ab: <speak> Mi piace <lang xml:lang="en-us">bruce Springseen.</lang> </speak> Amazon Polly pronounces his in he Giorgio voice using Ialian-accened English. 85

91 <mark> <mark> This ag provides he user wih he abiliy o place a cusom ag wihin he ex. No acion is aken on he ag by Amazon Polly, bu when SSML meadaa is reurned, he posiion of his ag is also reurned. This ag may be anyhing designaed by he user wih he following forma: <mark name="ag_name"/> For example, if he ag name is "animal" and he inpu ex is: <speak> Mary had a lile <mark name="animal"/>lamb. </speak> he following SSML meadaa migh be reurned by Amazon Polly {"ime":767,"ype":"ssml","sar":25,"end":46,"value":"animal"} <p> This ag indicaes a paragraph in he ex. This is equivalen o specifying a pause wih <break srengh="x-srong"/>. As wih he <s> ag, you need o enclose he senence in his ag. <speak> <p>this is he firs paragraph. There should be a pause afer his ex is spoken.</ p> <p>this is he second paragraph.</p> </speak> <phoneme> This ag provides a phoneic pronunciaion (he phonemes) for he indicaed ex. Two aribues are required wih he phoneme ag: alphabe ipa Indicaes ha he phoneme uses he Inernaional Phoneic Alphabe (IPA) sysem. x-sampa Indicaes ha he phoneme uses he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA) sysem. ph Indicaes he phoneic symbols o be used for pronunciaion. Amazon Polly suppors sandard IPA and X-SAMPA phoneic symbols. For more informaion, see Phoneic Tables Used by Amazon Polly (p. 96) When using he phoneme ag, Amazon Polly uses he pronunciaion provided in he ph aribue raher han he one associaed by defaul wih he ex conained wihin he ags. However, you should sill provide human-readable ex wihin he ags. For insance, he word "pecan" can be pronounced wo differen ways. In he following example, he word pecan is assigned a differen cusom pronunciaion in each line. Amazon Polly hus uses he pronunciaion provided in he ph aribues insead of he defaul pronunciaion: 86

92 <prosody> <speak> You say, <phoneme alphabe="ipa" ph="p##k##n">pecan</phoneme>. I say, <phoneme alphabe="ipa" ph="#pi.kæn">pecan</phoneme>. </speak> Noe In some cases phoneic symbols may include single or double quoes, which conflic wih he quoe marks used o mark he srings being spoken. Use a backslash in hese cases o mark he symbol so i doesn conflic wih he sring marker. For example, when you use he IPA symbol for primary sress (a single quoe mark), you would mark i as \'. The X-SAMPA symbol for an open mid-cenral unrounded r-colored vowel (3') is marked as 3\'. The single or double quoe sring marker is no changed. <prosody> The prosody ag enables you o conrol he volume, rae, and pich of he delivery of he ex. The following values can be used for he volume aribue, o modify he volume of he speech: defaul: Reses he volume o he defaul for he curren voice. silen, x-sof, sof, medium, loud, x-loud: Ses he volume o a predefined value for he curren voice. +ndb, -ndb: Changes he volume relaive o he curren volume level. A value of "+0dB" means no change of volume, "+6dB" means approximaely wice he curren ampliude, "-6dB" means approximaely half of he curren ampliude. The following values can be used for he rae aribue, o modify he rae of speech: x-slow, slow, medium, fas, x-fas: Ses he rae of speech o a predefined value for he curren voice. The following values can be used for he pich aribue, o modify he pich of he voice: defaul: Reses pich o he defaul pich for he curren voice. x-low, low, medium, high, x-high: Ses he pich o a predefined value for he curren voice. +n% or -n%: Adjuss pich by a relaive percenage change in he curren pich level of he curren voice. For example, +4%, or -2%. For example, you could se he prosody for a passage in he following ways: <speak> Prosody can be used o change he way words sound. The following words are <prosody volume="x-loud"> quie a bi louder han he res of his passage. </prosody> Each morning when I wake up, <prosody rae="x-slow">i speak quie slowly and deliberaely unil I have my coffee.</prosody> I can also change he pich of my voice using prosody. Do you like <prosody pich="+5%"> speech wih a pich ha is higher,</prosody> or <prosody pich="-10%"> is a lower pich preferable?</prosody> </speak> <s> This ag indicaes a senence in he ex. This is equivalen o: 87

93 <say-as> Ending a senence wih a period (.). Specifying a pause wih <break srengh="srong"/>. Unlike he <break srengh="srong"/> ag, you mus enclose he senence in his ag. In his example, he <s> ag creaes a shor pause afer boh he firs and second senences. The final senence has no <s> ag bu also has a shor pause afer i because i conains a period. <speak> <s>mary had a lile lamb</s> <s>whose fleece was whie as snow</s> And everywhere ha Mary wen, he lamb was sure o go. </speak> <say-as> This ag indicaes how he inpu ex should be inerpreed. This enables you provide addiional conex o eliminae any ambiguiy on how Amazon Polly should render he ex. When using he say-as ag, you need o indicae how Amazon Polly should inerpre he ex wih he inerpre-as aribue. The following values are available wih he inerpre-as aribue: characer or spell-ou: spells ou each leer, as in a-b-c. cardinal or number: pronounces he value as a cardinal number, as in 1,234. ordinal: pronounces he value as an ordinal number, as in 1,234h. digis: pronounces each digi of he number individually, as in fracion: pronounces he value as a fracion. This works for boh common fracions such as 3/20, and mixed fracions, such as 2 1/2 (see below). uni: inerpres a value as a measuremen. The value should be followed by eiher a number or a fracion followed by a uni (wih no space in beween), or by jus a uni, as in 1meer. dae: inerpres he value as a dae. The forma of he dae mus be specified wih he forma aribue (see below). ime: inerpres he value as duraion in minues and seconds, as in 1'21". address: inerpres he value as par of a sree address. expleive: "bleeps" ou he conen included wihin he ag. elephone: inerpres he value as a 7-digi or 10-digi elephone, as in This can also handle elephone exensions, as in x345. Noe Currenly he elephone opion is only available for English language voices. The Amazon Polly service aemps o inerpre he ex you provide correcly based on he ex s formaing even wihou he <say-as> ag. For example, if your ex includes , Amazon Polly will inerpre i as a 10-digi elephone number and say each individual digi individually, wih a brief pause for each dash. I isn' necessary o use <say-as inerpre-as="elephone"> in his case. However, if you provide he ex and wan Amazon Polly o say i as a phone number, you need o use <say-as inerpre-as="elephone">. The logic underlying he inerpreaion of each elemen is language-specific. For example, US and UK English differ in how phone numbers are pronounced (in UK English, sequences of he same digi are 88

94 <sub> grouped ogeher, e.g. "double five" or "riple four"). You can es he following example wih a US voice and wih a UK voice o demonsrae he difference: <speak> Richard's number is <say-as inerpre-as="elephone"> </say-as> </speak> Fracions Amazon Polly will inerpre values wihin he say-as having he inerpre-as="fracion" aribue as common fracions. The following is he synax for fracions: Fracion Synax: cardinal number/cardinal number such as 2/9. For example: <say-as inerpre-as="fracion">2/9</say-as> is pronounced "wo ninhs". Non-negaive Mixed Number Synax: cardinal number+cardinal number/cardinal number such as 3 1/2. For example: <say-as inerpre-as="fracion">3+1/2</say-as> is pronounced "hree and a half". Daes The following values can be used when inerpre-as is se o dae o indicae he forma of he dae: mdy: monh-day-year. dmy: day-monh-year. ymd: year-monh-day. md: monh-day. dm: day-monh. ym: year-monh. my: monh-year. d: day. m: monh. y: year. yyyymmdd: year-monh-day. If his forma is used, you can include quesion marks for porions of he dae o leave ou. For insance, <say-as inerpre-as="dae">????0922</say-as> would be "Sepember 22nd." <sub> This ag subsiues he pronunciaion inside he alias aribue for he pronunciaion of he ex enclosed in he ag. A common use for his ag is o provide expanded pronunciaion for acronyms and abbreviaions. <speak> My favorie chemical elemen is <sub alias="mercury">hg</sub>, i looks cool. </speak> 89

95 <w> <w> Similar o <say-as>, his ag cusomizes word pronunciaion by specifying he word s par of speech. The aribue role is included wih he ag o specify he par of speech indicaed. The following values can be used for he role aribue: amazon:vb: inerpres he word as a verb (presen simple). amazon:vbd: inerpres he word as pas ense or as a pas pariciple. amazon:sense_1: uses he non-defaul sense of he word when presen. For example, he defaul meaning of "bass" is ha of he low noe in a chord or he lowes par of he musical range. This is pronounced differenly han he alernae sense a freshwaer fish, also called a "bass" bu pronounced differenly. Using <w role="amazon:sense_1">bass</w> renders he non-defaul pronunciaion (freshwaer fish) for he audio ex. Depending how you inend o use i, he American English pronunciaion of he word "read," depending on how i's being used: <speak> The presen simple form of he word is pronounced <w role="amazon:vb">read</w>, where he pas ense or pas pariciple is pronounced <w role="amazon:vbd">read</w>. </speak> <amazon:breah> and <amazon:auo-breahs> Naural-sounding speech includes boh correcly spoken words and breahing sounds. By adding breahing sounds o synhesized speech, you can make i sound more naural. The <amazon:breah> and <amazon:auo-breahs> ags provide breahs. You have he following opions: Manual mode: you se he locaion, lengh, and volume of a breah sound wihin he ex Auomaed mode: Amazon Polly auomaically insers breahing sounds ino he speech oupu Mixed mode: boh you and Amazon Polly add breahing sounds Manual Mode In manual mode, you place he <amazon:breah/> ag in he inpu ex where you wan o locae a breah. You can cusomize he lengh and volume of breahs wih he duraion and volume aribues, respecively: duraion: Conrols he lengh of he breah. Valid values are: defaul, x-shor, shor, medium, long, x-long. The defaul value is medium. volume: Conrols how loud breahing sounds. Valid values are: defaul, x-sof, sof, medium, loud, x-loud. The defaul value is medium. Noe The exac lengh and volume of each aribue value is dependen on he specific Amazon Polly voice used. To se a breah sound using he defauls, use <amazon:breah/> wihou aribues. For example, o use aribues o se he duraion and volume for a breah o medium, you would se he aribues as follows: <speak> 90

96 <amazon:breah> and <amazon:auo-breahs> Someimes you wan o inser only <amazon:breah duraion="medium" volume="x-loud"/>a single breah. </speak> To use he defauls, you would jus use he ag: <speak> Someimes you need <amazon:breah/>o inser one or more average breahes <amazon:breah/> so ha he ex sounds correc. </speak> You can add individual breahing sounds wihin a passage, as follows: <speak> <amazon:breah duraion="long" volume="x-loud"/> <prosody rae="120%"> <prosody volume="loud"> Wow! <amazon:breah duraion="long" volume="loud"/> </prosody> Tha was quie fas <amazon:breah duraion="medium" volume="x-loud"/>. I almos bea my personal bes ime on his rack. </prosody> </speak> Auomaed Mode In auomaed mode, you use he <amazon:auo-breahs> ag o ell Amazon Polly o auomaically creae breahing noises a appropriae inervals. You can se he frequency of he inervals, heir volume, and heir duraion. Place he </amazon:auo-breahs> ag a he beginning of he ex ha you wan o apply auomaed breahing o and he close he ag a he end. Noe Unlike he manual mode ag, <amazon:breah/>, he <amazon:auo-breahs> ag requires a closing ag (</amazon:auo-breahs>). You can use he following opional aribues wih he <amazon:auo-breahs> ag: volume: Conrols how loud he breahing sounds. Valid values are: defaul, x-sof, sof, medium, loud, x-loud. The defaul value is medium. frequency: Conrols how ofen breahing sounds occur in he ex. Valid values are: defaul, x-low, low, medium, high, x-high. The defaul value is medium. duraion: Conrols he lengh of he breah. Valid values are: defaul, x-shor, shor, medium, long, x-long. The defaul value is medium. By defaul, he frequency of breahing sounds depends on he inpu ex. However, breahing sounds ofen occur afer commas and periods. The following examples show how o use he <amazon:auo-breahs> ag. To decide which opions o use for your conen, copy he applicable examples o he Amazon Polly console and lisen o he differences. Using auomaed mode wihou opional parameers. <speak> <amazon:auo-breahs>amazon Polly is a service ha urns ex ino lifelike speech, allowing you o creae applicaions ha alk and build enirely new caegories of speechenabled producs. Amazon Polly is a ex-o-speech service ha uses advanced deep learning 91

97 <amazon:breah> and <amazon:auo-breahs> echnologies o synhesize speech ha sounds like a human voice. Wih dozens of lifelike voices across a variey of languages, you can selec he ideal voice and build speechenabled applicaions ha work in many differen counries.</amazon:auo-breahs> </speak> Using auomaed mode wih volume conrol. The unspecified parameers (duraion and frequency) are se o he defaul values (medium). <speak> <amazon:auo-breahs volume="x-sof">amazon Polly is a service ha urns ex ino lifelike speech, allowing you o creae applicaions ha alk and build enirely new caegories of speech-enabled producs. Amazon Polly is a ex-o-speech service, ha uses advanced deep learning echnologies o synhesize speech ha sounds like a human voice. Wih dozens of lifelike voices across a variey of languages, you can selec he ideal voice and build speechenabled applicaions ha work in many differen counries.</amazon:auo-breahs> </speak> Using auomaed mode wih frequency conrol. The unspecified parameers (duraion and volume) are se o he defaul values (medium). <speak> <amazon:auo-breahs frequency="x-low">amazon Polly is a service ha urns ex ino lifelike speech, allowing you o creae applicaions ha alk and build enirely new caegories of speech-enabled producs. Amazon Polly is a ex-o-speech service, ha uses advanced deep learning echnologies o synhesize speech ha sounds like a human voice. Wih dozens of lifelike voices across a variey of languages, you can selec he ideal voice and build speechenabled applicaions ha work in many differen counries.</amazon:auo-breahs> </speak> Using auomaed mode wih muliple parameers. For he unspecified Duraion parameer, Amazon Polly uses he defaul value (medium). <speak> <amazon:auo-breahs volume="x-loud" frequency="x-low">amazon Polly is a service ha urns ex ino lifelike speech, allowing you o creae applicaions ha alk and build enirely new caegories of speech-enabled producs. Amazon Polly is a ex-o-speech service, ha uses advanced deep learning echnologies o synhesize speech ha sounds like a human voice. Wih dozens of lifelike voices across a variey of languages, you can selec he ideal voice and build speech-enabled applicaions ha work in many differen counries.</amazon:auobreahs> </speak> To enhance he effec of he amazon:auo-breahs ags, you can nes hem. For example: 92

98 <amazon:effec name="drc"> <speak> <amazon:auo-breahs volume="sof" frequency="low">amazon Polly is a service ha urns ex ino lifelike speech, allowing you o creae applicaions ha alk and build enirely new caegories of speech-enabled producs. <amazon:auo-breahs frequency="high">amazon Polly is a ex-o-speech service, ha uses advanced deep learning echnologies o synhesize speech ha sounds like a human voice. </amazon:auo-breahs>wih dozens of lifelike voices across a variey of languages, you can selec he ideal voice and build speech-enabled applicaions ha work in many differen counries.</amazon:auo-breahs> </speak> When you nes breah ags, Amazon Polly uses he seings for he ouer ag for he inner ag unless you specify a new seing. In he preceding example, he volume of he ouer ag is se o sof. Because he inner ag doesn' specify he volume, i uses he ouer ag's seing of sof. Noe Each nesed <amazon:auo-breahs> ag mus be closed wih an </amazon:auobreahs> ag. Mixed Mode For he greaes flexibiliy, you can combine auomaed mode ags wih manual mode ags. In mixed mode, Amazon Polly can auomae breahing hroughou a ex passage and you can add breahing sounds in specific locaions. For example: <speak> <amazon:auo-breahs> Breahing (or respiraion) is he process of moving air ino and ou of he lungs o faciliae gas exchange beween he inernal and exernal environmens, mosly by bringing in oxygen <amazon:breah/> and flushing ou carbon dioxide. </amazon:auo-breahs> </speak> <amazon:effec name="drc"> Depending on he ex, language, and voice used in an audio file, he sounds range from sof o loud. Environmenal sounds, such as he sound of a moving vehicle, can ofen mask he sofer sounds, which makes he audio rack difficul o hear clearly. To enhance he volume of cerain sounds in your audio file, use he dynamic range compression (drc) ag. The drc ag ses a mid-range "loudness" hreshold for your audio, and increases he volume (he gain) of he sounds around ha hreshold. I applies he greaes gain increase closes o he hreshold, and he gain increase is lessened farher away from he hreshold. 93

99 <amazon:effec name="drc"> This makes he middle-range sounds easier o hear in a noisy environmen, which makes he enire audio file clearer. The drc ag is a Boolean parameer (i's eiher presen or i isn'). I uses he synax: <amazon:effec name="drc"> and is closed wih </amazon:effec>. You can use he drc ag wih any voice or language suppored by Amazon Polly. You can apply i o an enire secion of he recording, or for only a few words. For example: <speak> Some audio is difficul o hear in a moving vehicle, bu <amazon:effec name="drc"> his audio is less difficul o hear in a moving vehicle.</amazon:effec> </speak> Noe When you use "drc" in he amazon:effec synax, i is case-sensiive. Using drc wih he prosody volume ag As he following graphic shows, he prosody volume ag evenly increases he volume of an enire audio file from he original level (doed line) o an adjused level (solid line). To furher increase he volume of cerain pars of he file, use he drc ag wih he prosody volume ag. Combining ags doesn' affec he seings of he prosody volume ag. When you use he drc and prosody volume ags ogeher, Amazon Polly applies he drc ag firs, increasing he middle-range sounds (hose near he hreshold). I hen applies he prosody volume ag and furher increases he volume of he enire audio rack evenly. To use he ags ogeher, nes one inside he oher. For example: <speak> <prosody volume="loud">this ex needs o be undersandable and loud. <amazon:effec name="drc"> This ex also needs o be more undersandable in a moving car.</amazon:effec></ prosody> </speak> In his ex, he prosody volume ag increases he volume of he enire passage o "loud." The drc ag enhances he volume of he middle-range values in he second senence. 94

100 <amazon:effec phonaion="sof"> Noe When using he drc and prosody volume ags ogeher, use sandard XML pracices for nesing ags. <amazon:effec phonaion="sof"> This ag indicaes ha he inpu ex should be spoken in a sofer han normal voice raher han as normal speech. This can be used wih any of he voices in he Amazon Polly Tex-o-Speech porfolio. I uses he synax: <amazon:effec phonaion= sof > and is closed wih </amazon:effec>. For example, when using he Mahew voice: <speak> This is Mahew speaking in my normal voice. <amazon:effec phonaion="sof">this is Mahew speaking in my sofer voice.</amazon:effec> </speak> In his case, he firs porion of he synhesized speech is spoken wih a normal voice, whereas he porion using he phonaion ag is spoken more sofly. <amazon:effec vocal-rac-lengh> Timbre is he onal qualiy of a voice ha helps you ell he difference beween voices, even when hey have he same pich and loudness. One of he mos imporan physiological feaures which conribue owards speech imbre is he lengh of he vocal rac, a caviy of air which spans from he op of he vocal folds up o he edge of he lips. To conrol he imbre of oupu speech in Amazon Polly, use he vocal-rac-lengh ag. This ag has he effec of changing he lengh of he speaker s vocal rac, which sounds like a change in he speaker s size. When you increase he vocal-rac-lengh, he speaker sounds physically bigger. When you decrease i, he speaker sounds smaller. You can use his ag wih any of he voices in he Amazon Polly Tex-o-Speech porfolio. To change imbre, use he following values: +n% or -n%: Adjuss he vocal rac lengh by a relaive percenage change in he curren voice. For example, +4% or -2%. Valid values range from +100% o -50%. Values ouside his range are clipped. For example, +111% sounds like +100% and -60% sounds like -50%. n%: Changes he vocal rac lengh o an absolue percenage of he rac lengh of he curren voice. For example, 110% or 75%. An absolue value of 110% is equivalen o a relaive value of +10%. An absolue value of 100% is he same as he defaul value for he curren voice. The following example shows how o change he vocal rac lengh o change imbre: <speak> This is my original voice, wihou any modificaions. <amazon:effec vocal-raclengh="+15%"> Now, imagine ha I am much bigger. </amazon:effec> <amazon:effec vocal-raclengh="-15%"> Or, perhaps you prefer my voice when I'm very small. </amazon:effec> You can also conrol he imbre of my voice by making minor adjusmens. <amazon:effec vocal-raclengh="+10%"> For example, by making me sound jus a lile bigger. </amazon:effec><amazon:effec vocal-rac-lengh="-10%"> Or, making me sound only somewha smaller. </ amazon:effec> 95

101 <amazon:effec name="whispered"> </speak> Combining Muliple Tags You can combine he vocal-rac-lengh ag wih any oher SSML ag ha is suppored by Amazon Polly. Because imbre (vocal rac lengh) and pich are closely conneced, you migh ge he bes resuls by using boh he vocal-rac-lengh and he <prosody pich> ags. To produce he mos realisic voice, you will likely use differen percenages of change for he wo ags. Experimen wih various combinaions o ge he resuls you wan. The following example shows how o combine ags. <speak> The pich and imbre of a person's voice are conneced in human speech. <amazon:effec vocal-rac-lengh="-15%"> If you are going o reduce he vocal rac lengh, </amazon:effec><amazon:effec vocal-rac-lengh="-15%"> <prosody pich="+20%"> you migh consider increasing he pich, oo. </prosody></amazon:effec> <amazon:effec vocal-rac-lengh="+15%"> If you choose o lenghen he vocal rac, </amazon:effec> <amazon:effec vocal-rac-lengh="+15%"> <prosody pich="-10%"> you migh also wan o lower he pich. </prosody></amazon:effec> </speak> <amazon:effec name="whispered"> This ag indicaes ha he inpu ex should be spoken in a whispered voice raher han as normal speech. This can be used wih any of he voices in he Amazon Polly Tex-o-Speech porfolio. I uses he synax: <amazon:effec name= whispered > and is closed wih </amazon:effec>. For example: <speak> <amazon:effec name="whispered">if you make any noise, </amazon:effec> she said, <amazon:effec name="whispered">hey will hear us.</amazon:effec> </speak> In his case, he synhesized speech spoken by he characer will be whispered, whereas he phrase "she said" will be in he normal synhesized speech of he seleced Amazon Polly voice. You can enhance he "whispered" effec by slowing down he prosody rae by up o 10%, depending on he effec you desire. For example: <speak> When any voice is made o whisper, <amazon:effec name="whispered"> <prosody rae="-10%">he sound is slower and quieer han normal speech </prosody></amazon:effec> </speak> When generaing speech marks for a whispered voice, he audio sream mus also include he whispered voice o ensure ha he speech marks mach he audio sream. Phoneic Tables Used by Amazon Polly The following provides a phoneic pronunciaion (he phonemes) for Amazon Polly SSML ags for American English. 96

102 Phoneic Tables Used by Amazon Polly IPA X-SAMPA Descripion Example Consonans b b Voiced bilabial bed d d Voiced alveolar dig d ʒ dz Voiced posalveolar affricae jump ð D Voiced denal hen f f Voiceless labiodenal five g g Voiced velar game h h Voiceless gloal house j j Palaal approximan yes k k Voiceless velar ca l l Alveolar laeral approximan lay m m Bilabial nasal mouse n n Alveolar nasal nap ŋ N Velar nasal hing p p Voiceless bilabial speak ɹ r\ Alveolar approximan red s s Voiceless alveolar seem ʃ S Voiceless posalveolar ship Voiceless alveolar rap ʃ S Voiceless posalveolar affricae char Θ T Voiceless denal hin v v Voiced labiodenal ves w w Labial-velar approximan wes z z Voiced alveolar zero ʒ Z Voiced posalveolar vision Vowels Mid cenral vowel arena 97

103 Phoneic Tables Used by Amazon Polly IPA X-SAMPA Descripion Example Mid cenral r-colored vowel reader æ { Near open-fron unrounded vowel rap aɪ ai Diphhong price aʊ au Diphhong mouh ɑ A Long open-back unrounded vowel faher eɪ ei Diphhong face ɝ 3' Open mid-cenral unrounded r-colored vowel ɛ E Open mid-fron unrounded vowel i: i Long close fron unrounded vowel ɪ I Near-close near-fron nurse dress fleece ki oʊ ou Diphhong goa ɔ O Long open mid-back hough ɔɪ OI Diphhong choice u u Long close-back rounded vowel ʊ U Near-close near-back ʌ V Open-mid-back unrounded vowel goose foo sru Oher Symbols ' " primary sress Alabama, % secondary sress Alabama.. syllable boundary A.la.ba.ma 98

104 Applying Muliple Lexicons Managing Lexicons Pronunciaion lexicons enable you o cusomize he pronunciaion of words. Amazon Polly provides API operaions ha you can use o sore lexicons in an AWS region. Those lexicons are hen specific o ha paricular region. You can use one or more of he lexicons from ha region when synhesizing he ex by using he SynhesizeSpeech operaion. This applies he specified lexicon o he inpu ex before he synhesis begins. For more informaion, see SynhesizeSpeech (p. 163). Noe These lexicons mus conform wih he Pronunciaion Lexicon Specificaion (PLS) W3C recommendaion. For more informaion, see Pronunciaion Lexicon Specificaion (PLS) Version 1.0 on he W3C websie. The following are examples of ways o use lexicons wih speech synhesis engines: Common words are someimes sylized wih numbers aking he place of leers, as wih "g3 sm4r" (ge smar). Humans can read hese words correcly. However, a Tex-o-Speech (TTS) engine reads he ex lierally, pronouncing he name exacly as i is spelled. This is where you can leverage lexicons o cusomize he synhesized speech by using Amazon Polly. In his example, you can specify an alias (ge smar) for he word "g3 sm4r" in he lexicon. Your ex migh include an acronym, such as W3C. You can use a lexicon o define an alias for he word W3C so ha i is read in he full, expanded form (World Wide Web Consorium). Lexicons give you addiional conrol over how Amazon Polly pronounces words uncommon o he seleced language. For example, you can specify he pronunciaion using a phoneic alphabe. For more informaion, see Pronunciaion Lexicon Specificaion (PLS) Version 1.0 on he W3C websie. Topics Applying Muliple Lexicons (p. 99) Managing Lexicons Using he Amazon Polly Console (p. 100) Managing Lexicons Using he AWS CLI (p. 103) Applying Muliple Lexicons You can apply up o five lexicons o your ex. If he same grapheme appears in more han one lexicon ha you apply o your ex, he order in which hey are applied can make a difference in he resuling speech. For example, given he following ex, "Hello, my name is Bob." and wo lexemes in differen lexicons ha boh use he grapheme Bob. LexA <lexeme> <grapheme>bob</grapheme> <alias>rober</alias> </lexeme> LexB <lexeme> 99

105 Managing Lexicons Using he Console <grapheme>bob</grapheme> <alias>bobby</alias> </lexeme> If he lexicons are lised in he order LexA and hen LexB, he synhesized speech will be "Hello, my name is Rober." If hey are lised in he order LexB and hen LexA, he synhesized speech is "Hello, my name is Bobby." Example Applying LexA Before LexB aws polly synhesize-speech \ --lexicon-names LexA LexB \ --oupu-forma mp3 \ --ex 'Hello, my name is Bob' \ --voice-id Jusin \ bobab.mp3 Speech oupu: "Hello, my name is Rober." Example Applying LexB before LexA aws polly synhesize-speech \ --lexicon-names LexB LexA \ --oupu-forma mp3 \ --ex 'Hello, my name is Bob' \ --voice-id Jusin \ bobba.mp3 Speech oupu: "Hello, my name is Bobby." For informaion abou applying lexicons using he Amazon Polly console, see Applying Lexicons Using he Console (Synhesize Speech) (p. 101). Managing Lexicons Using he Amazon Polly Console You can use he Amazon Polly console o upload, download, apply, filer, and delee lexicons. The following procedures demonsrae each of hese processes. Uploading Lexicons Using he Console To use a pronunciaion lexicon, you mus firs upload i. There are wo locaions on he console from which you can upload a lexicon, he Tex-o-Speech ab and he Lexicons ab. The following processes describe how o add lexicons ha you can use o cusomize how words and phrases uncommon o he chosen language are pronounced. To add a lexicon from he Lexicons Tab 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. Choose he Lexicons ab. 3. Choose Upload. 100

106 Applying Lexicons Using he Console (Synhesize Speech) 4. Browse o find he lexicon ha you wan o upload. You can use only PLS files ha use he.pls and.xml exensions. 5. Choose Open. If a lexicon by he same name (wheher a.pls or.xml file) already exiss, uploading he lexicon will overwrie he exising lexicon. To add a lexicon from he Tex-o-Speech Tab 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. Choose he Tex-o-Speech ab. 3. Choose Cusomize pronunciaion of words or phrases using lexicons, hen choose Upload lexicon. 4. Browse o find he lexicon ha you wan o upload. You can use only PLS files ha use he.pls and.xml exensions. 5. Choose Open. If a lexicon wih he same name (wheher a.pls or.xml file) already exiss, uploading he lexicon will overwrie he exising lexicon. Applying Lexicons Using he Console (Synhesize Speech) The following procedure demonsraes how o apply a lexicon o your inpu ex by applying he W3c.pls lexicon o subsiue "World Wide Web Consorium" for "W3C". If you apply muliple lexicons o your ex hey are applied in a op-down order wih he firs mach aking precedence over laer maches. A lexicon is applied o he ex only if he language specified in he lexicon is he same as he language chosen. You can apply a lexicon o plain ex or SSML inpu. Example Applying he W3C.pls Lexicon To creae he lexicon you'll need for his exercise, see Using he PuLexicon Operaion (p. 103). Use a plain ex edior o creae he W3C.pls lexicon shown a he op of he opic. Remember where you save his file. To apply he W3C.pls lexicon o your inpu In his example we inroduce a lexicon o subsiue "World Wide Web Consorium" for "W3C". Compare he resuls of his exercise wih ha of Using SSML wih he Amazon Polly Console (p. 76) for boh US English and anoher language. 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. Do one of he following: Choose he Plain ex ab and hen ype or pase his ex ino he ex inpu box. He was caugh up in he game. In he middle of he 10/3/2014 W3C meeing he shoued, "Score!" quie loudly. Choose he SSML ab and hen ype or pase his ex ino he ex inpu box. <speak>he wasn' paying aenion.<break ime="1s"/> In he middle of he 10/3/2014 W3C meeing 101

107 Filering he Lexicon Lis Using he Console he shoued, "Score!" quie loudly.</speak> 3. From he Choose a language and region lis, choose English US, hen choose a voice you wan o use for his ex. 4. Choose Cusomize pronunciaion of words or phrases using lexicons. 5. From he lis of lexicons, choose W3C (English, US). If he W3C (English, US) lexicon is no lised, choose Upload lexicon and upload i, hen choose i from he lis. To creae his lexicon, see Using he PuLexicon Operaion (p. 103). 6. To lisen o he speech immediaely, choose Lisen o speech. 7. To save he speech o a file, a. Choose Save speech o MP3. b. To change o a differen file forma, choose Change file forma, choose he file forma you wan, and hen choose Change. Repea he previous seps, bu choose a differen language and noice he difference in he oupu. Filering he Lexicon Lis Using he Console The following procedure describes how o filer he lexicons lis so ha only lexicons of a chosen language are displayed. To filer he lexicons lised by language 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. Choose he Lexicons ab. 3. Choose Filer. 4. From he lis of languages, choose he language you wan o filer on. The lis displays only he lexicons for he chosen language. Downloading Lexicons Using he Console The following process describes how o download one or more lexicons. You can add, remove, or modify lexicon enries in he file and hen upload i again o keep your lexicon up-o-dae. To download one or more lexicons 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. Choose he Lexicons ab. 3. Choose he lexicon or lexicons you wan o download. a. To download a single lexicon, choose is name from he lis. b. To download muliple lexicons as a single compressed archive file, selec he check box nex o each enry in he lis ha you wan o download. 4. Choose Download. 5. Open he folder where you wan o download he lexicon. 6. Choose Save. 102

108 Deleing a Lexicon Using he Console Deleing a Lexicon Using he Console To delee a lexicon The following process describes how o delee a lexicon. Afer deleing he lexicon, you mus add i back before you can use i again. You can delee one or more lexicons a he same ime by selecing he check boxes nex o individual lexicons. 1. Sign in o he AWS Managemen Console and open he Amazon Polly console a hps:// console.aws.amazon.com/polly/. 2. Choose he Lexicons ab. 3. Choose one or more lexicons ha you wan o delee from he lis. 4. Choose Delee. 5. Choose Delee o remove he lexicon from he region or Cancel o keep i. Managing Lexicons Using he AWS CLI The following opics cover he AWS CLI commands needed o manage your pronunciaion lexicons. Topics Using he PuLexicon Operaion (p. 103) Using he GeLexicon Operaion (p. 107) Using he LisLexicons Operaions (p. 108) Using he DeleeLexicon Operaion (p. 109) Using he PuLexicon Operaion Wih Amazon Polly, you can use PuLexicon (p. 161) o sore pronunciaion lexicons in a specific AWS Region for your accoun. Then, you can specify one or more of hese sored lexicons in your SynhesizeSpeech (p. 163) reques ha you wan o apply before he service sars synhesizing he ex. For more informaion, see Managing Lexicons (p. 99). This secion provides example lexicons and sep-by-sep insrucions for soring and esing hem. Noe These lexicons mus conform o he Pronunciaion Lexicon Specificaion (PLS) W3C recommendaion. For more informaion, see Pronunciaion Lexicon Specificaion (PLS) Version 1.0 on he W3C websie. Example 1: Lexicon wih One Lexeme Consider he following W3C PLS-complian lexicon. <?xml version="1.0" encoding="utf-8"?> <lexicon version="1.0" xmlns="hp:// xmlns:xsi="hp:// xsi:schemalocaion="hp:// hp:// alphabe="ipa" xml:lang="en-us"> <lexeme> <grapheme>w3c</grapheme> 103

109 PuLexicon <alias>world Wide Web Consorium</alias> </lexeme> </lexicon> Noe he following: The wo aribues specified in he <lexicon> elemen: The xml:lang aribue specifies he language code, en-us, o which he lexicon applies. Amazon Polly can use his example lexicon if he voice you specify in he SynhesizeSpeech call has he same language code (en-us). Noe You can use he DescribeVoices operaion o find he language code associaed wih a voice. The alphabe aribue specifies IPA, which means ha he Inernaional Phoneic Alphabe (IPA) alphabe is used for pronunciaions. IPA is one of he alphabes for wriing pronunciaions. Amazon Polly also suppors he Exended Speech Assessmen Mehods Phoneic Alphabe (X-SAMPA). The <lexeme> elemen describes he mapping beween <grapheme> (ha is, a exual represenaion of he word) and <alias>. To es his lexicon, do he following: 1. Save he lexicon as example.pls. 2. Run he pu-lexicon AWS CLI command o sore he lexicon (wih he name w3c), in he us-eas-2 region. aws polly pu-lexicon \ --name w3c \ --conen file://example.pls 3. Run he synhesize-speech command o synhesize sample ex o an audio sream (speech.mp3), and specify he opional lexicon-name parameer. aws polly synhesize-speech \ --ex 'W3C is a Consorium' \ --voice-id Joanna \ --oupu-forma mp3 \ --lexicon-names="w3c" \ speech.mp3 4. Play he resuling speech.mp3, and noice ha he word W3C in he ex is replaced by World Wide Web Consorium. The preceding example lexicon uses an alias. The IPA alphabe menioned in he lexicon is no used. The following lexicon specifies a phoneic pronunciaion using he <phoneme> elemen wih he IPA alphabe. <?xml version="1.0" encoding="utf-8"?> <lexicon version="1.0" xmlns="hp:// xmlns:xsi="hp:// xsi:schemalocaion="hp:// hp:// 104

110 PuLexicon alphabe="ipa" xml:lang="en-us"> <lexeme> <grapheme>pecan</grapheme> <phoneme>p##k##n</phoneme> </lexeme> </lexicon> Follow he same seps o es his lexicon. Make sure you specify inpu ex ha has word "pecan" (for example, "Pecan pie is delicious"). Example 2: Lexicon wih Muliple Lexemes In his example, he lexeme ha you specify in he lexicon applies exclusively o he inpu ex for he synhesis. Consider he following lexicon: <?xml version="1.0" encoding="utf-8"?> <lexicon version="1.0" xmlns="hp:// xmlns:xsi="hp:// xsi:schemalocaion="hp:// hp:// alphabe="ipa" xml:lang="en-us"> <lexeme> <grapheme>w3c</grapheme> <alias>world Wide Web Consorium</alias> </lexeme> <lexeme> <grapheme>w3c</grapheme> <alias>www Consorium</alias> </lexeme> <lexeme> <grapheme>consorium</grapheme> <alias>communiy</alias> </lexeme> </lexicon> The lexicon specifies hree lexemes, wo of which define an alias for he grapheme W3C as follows: The firs <lexeme> elemen defines an alias (World Wide Web Consorium). The second <lexeme> defines an alernaive alias (WWW Consorium). Amazon Polly uses he firs replacemen for any given grapheme in a lexicon. The hird <lexeme> defines a replacemen (Communiy) for he word Consorium. Firs, le's es his lexicon. Suppose you wan o synhesize he following sample ex o an audio file (speech.mp3), and you specify he lexicon in a call o SynhesizeSpeech. The W3C is a Consorium SynhesizeSpeech firs applies he lexicon as follows: As per he firs lexeme, he word W3C is revised as World Wide Web Consorium. The revised ex appears as follows: The World Wide Web Consorium is a Consorium 105

111 PuLexicon The alias defined in he hird lexeme applies only o he word Consorium ha was par of he original ex, resuling in he following ex: The World Wide Web Consorium is a Communiy. You can es his using he AWS CLI as follows: 1. Save he lexicon as example.pls. 2. Run he pu-lexicon command o sore he lexicon wih name w3c in he us-eas-2 region. aws polly pu-lexicon \ --name w3c \ --conen file://example.pls 3. Run he lis-lexicons command o verify ha he w3c lexicon is in he lis of lexicons reurned. aws polly lis-lexicons 4. Run he synhesize-speech command o synhesize sample ex o an audio file (speech.mp3), and specify he opional lexicon-name parameer. aws polly synhesize-speech \ --ex 'W3C is a Consorium' \ --voice-id Joanna \ --oupu-forma mp3 \ --lexicon-names="w3c" \ speech.mp3 5. Play he resuling speech.mp3 file o verify ha he synhesized speech reflecs he ex changes. Example 3: Specifying Muliple Lexicons In a call o SynhesizeSpeech, you can specify muliple lexicons. In his case, he firs lexicon specified (in order from lef o righ) overrides any preceding lexicons. Consider he following wo lexicons. Noe ha each lexicon describes differen aliases for he same grapheme W3C. Lexicon 1: w3c.pls <?xml version="1.0" encoding="utf-8"?> <lexicon version="1.0" xmlns="hp:// xmlns:xsi="hp:// xsi:schemalocaion="hp:// hp:// alphabe="ipa" xml:lang="en-us"> <lexeme> <grapheme>w3c</grapheme> <alias>world Wide Web Consorium</alias> </lexeme> </lexicon> Lexicon 2: w3calernae.pls <?xml version="1.0" encoding="utf-8"?> 106

112 GeLexicon <lexicon version="1.0" xmlns="hp:// xmlns:xsi="hp:// xsi:schemalocaion="hp:// hp:// alphabe="ipa" xml:lang="en-us"> <lexeme> <grapheme>w3c</grapheme> <alias>www Consorium</alias> </lexeme> </lexicon> Suppose you sore hese lexicons as w3c and w3calernae respecively. If you specify lexicons in order (w3c followed by w3calernae) in a SynhesizeSpeech call, he alias for W3C defined in he firs lexicon has precedence over he second. To es he lexicons, do he following: 1. Save he lexicons locally in files called w3c.pls and w3calernae.pls. 2. Upload hese lexicons using he pu-lexicon AWS CLI command. Upload he w3c.pls lexicon and sore i as w3c. aws polly pu-lexicon \ --name w3c \ --conen file://w3c.pls Upload he w3calernae.pls lexicon on he service as w3calernae. aws polly pu-lexicon \ --name w3calernae \ --conen file://w3calernae.pls 3. Run he synhesize-speech command o synhesize sample ex o an audio sream (speech.mp3), and specify boh lexicons using he lexicon-name parameer. aws polly synhesize-speech \ --ex 'PLS is a W3C recommendaion' \ --voice-id Joanna \ --oupu-forma mp3 \ --lexicon-names '["w3c","w3calernaive"]' \ speech.mp3 4. Tes he resuling speech.mp3. I should read as follows: PLS is a World Wide Web Consorium recommendaion Addiional Code Samples for he PuLexicon API Java Sample: PuLexicon (p. 113) Pyhon (Boo3) Sample: PuLexicon (p. 115) Using he GeLexicon Operaion Amazon Polly provides he GeLexicon (p. 157) API operaion o rerieve he conen of a pronunciaion lexicon you sored in your accoun in a specific region. 107

113 LisLexicons The following ge-lexicon AWS CLI command rerieves he conen of he example lexicon. aws polly ge-lexicon \ --name example If you don' already have a lexicon sored in your accoun, you can use he PuLexicon operaion o sore one. For more informaion, see Using he PuLexicon Operaion (p. 103). The following is a sample response. In addiion o he lexicon conen, he response reurns he meadaa, such as he language code o which he lexicon applies, number of lexemes defined in he lexicon, he Amazon Resource Name (ARN) of he resource, and he size of he lexicon in byes. The LasModified value is a Unix imesamp. { } "Lexicon": { "Conen": "lexicon conen in plain ex PLS forma", "Name": "example" }, "LexiconAribues": { "LanguageCode": "en-us", "LasModified": , "Alphabe": "ipa", "LexemesCoun": 1, "LexiconArn": "arn:aws:polly:us-eas-2:accoun-id:lexicon/example", "Size": 495 } Addiional Code Samples for he GeLexicon API Java Sample: GeLexicon (p. 112) Pyhon (Boo3) Sample: GeLexicon (p. 116) Using he LisLexicons Operaions Amazon Polly provides he LisLexicons (p. 159) API operaion ha you can use o ge he lis of pronunciaion lexicons in your accoun in a specific AWS Region. The following AWS CLI call liss he lexicons in your accoun in he us-eas-2 region. aws polly lis-lexicons The following is an example response, showing wo lexicons named w3c and omao. For each lexicon, he response reurns meadaa such as he language code o which he lexicon applies, he number of lexemes defined in he lexicon, he size in byes, and so on. The language code describes a language and locale o which he lexemes defined in he lexicon apply. { "Lexicons": [ { "Aribues": { "LanguageCode": "en-us", "LasModified": , "Alphabe": "ipa", "LexemesCoun": 1, "LexiconArn": "arn:aws:polly:aws-region:accoun-id:lexicon/w3c", "Size":

114 DeleeLexicon } ] }, { } }, "Name": "w3c" "Aribues": { "LanguageCode": "en-us", "LasModified": , "Alphabe": "ipa", "LexemesCoun": 1, "LexiconArn": "arn:aws:polly:aws-region:accoun-id:lexicon/omao", "Size": 645 }, "Name": "omao" Addiional Code Samples for he LisLexicon API Java Sample: LisLexicons (p. 112) Pyhon (Boo3) Sample: LisLexicon (p. 117) Using he DeleeLexicon Operaion Amazon Polly provides he DeleeLexicon (p. 153) API operaion o delee a pronunciaion lexicon from a specific AWS Region in your accoun. The following AWS CLI delees he specified lexicon. The following AWS CLI example is formaed for Unix, Linux, and macos. For Windows, replace he backslash (\) Unix coninuaion characer a he end of each line wih a care (^) and use full quoaion marks (") around he inpu ex wih single quoes (') for inerior ags. aws polly delee-lexicon \ --name example Addiional Code Samples for he DeleeLexicon API Java Sample: DeleeLexicon (p. 110) Pyhon (Boo3) Sample: DeleeLexicon (p. 118) 109

115 Sample Code Code and Applicaion Examples This secion provides code samples and example applicaions ha you can use o explore Amazon Polly. Topics Sample Code (p. 110) Example Applicaions (p. 118) The Sample Code opic conains snippes of code organized by programming language and separaed ino examples for differen Amazon Polly funcionaliy. The Example Applicaion opic conains applicaions organized by programming language ha can be used independenly o explore Amazon Polly. Before you sar using hese examples, we recommend ha you firs read Amazon Polly: How I Works (p. 3) and follow he seps described in Geing Sared wih Amazon Polly (p. 6). Sample Code This opic conains code samples for various funcionaliy which can be used o explore Amazon Polly. Sample Code by Programming Language Java Samples (p. 110) Pyhon Samples (p. 115) Java Samples The following code samples show how o use Java-based applicaions o accomplish various asks wih Amazon Polly. These samples are no full examples, bu can be included in larger Java applicaions ha use he AWS SDK for Java. Code Snipppes DeleeLexicon (p. 110) DescribeVoices (p. 111) GeLexicon (p. 112) LisLexicons (p. 112) PuLexicon (p. 113) Speech Marks (p. 114) SynhesizeSpeech (p. 114) DeleeLexicon The following Java code sample show how o use Java-based applicaions o delee a specific lexicon sored in an AWS region. A lexicon which has been deleed is no available for speech synhesis, nor can i be rerieved using eiher he GeLexicon or LisLexicon APIs. For more informaion on his operaion, see he reference for he DeleeLexicon API. package com.amazonaws.polly.samples; 110

116 Java Samples impor com.amazonaws.services.polly.amazonpolly; impor com.amazonaws.services.polly.amazonpollyclienbuilder; impor com.amazonaws.services.polly.model.deleelexiconreques; public class DeleeLexiconSample { privae Sring LEXICON_NAME = "SampleLexicon"; AmazonPolly clien = AmazonPollyClienBuilder.defaulClien(); public void deleelexicon() { DeleeLexiconReques deleelexiconreques = new DeleeLexiconReques().wihName(LEXICON_NAME); } } ry { clien.deleelexicon(deleelexiconreques); } cach (Excepion e) { Sysem.err.prinln("Excepion caugh: " + e); } DescribeVoices The following Java code sample show how o use Java-based applicaions o produce a lis of he voices ha are available for use when requesing speech synhesis. You can opionally specify a language code o filer he available voices. For example, if you specify en-us, he operaion reurns a lis of all available US English voices. For more informaion on his operaion, see he reference for he DescribeVoices API. package com.amazonaws.polly.samples; impor com.amazonaws.services.polly.amazonpolly; impor com.amazonaws.services.polly.amazonpollyclienbuilder; impor com.amazonaws.services.polly.model.describevoicesreques; impor com.amazonaws.services.polly.model.describevoicesresul; public class DescribeVoicesSample { AmazonPolly clien = AmazonPollyClienBuilder.defaulClien(); public void describevoices() { DescribeVoicesReques allvoicesreques = new DescribeVoicesReques(); DescribeVoicesReques enusvoicesreques = new DescribeVoicesReques().wihLanguageCode("en-US"); ry { Sring nextoken; do { DescribeVoicesResul allvoicesresul = clien.describevoices(allvoicesreques); nextoken = allvoicesresul.genextoken(); allvoicesreques.senextoken(nextoken); Sysem.ou.prinln("All voices: " + allvoicesresul.gevoices()); } while (nextoken!= null); do { DescribeVoicesResul enusvoicesresul = clien.describevoices(enusvoicesreques); nextoken = enusvoicesresul.genextoken(); enusvoicesreques.senextoken(nextoken); Sysem.ou.prinln("en-US voices: " + enusvoicesresul.gevoices()); 111

117 Java Samples } } } while (nextoken!= null); } cach (Excepion e) { Sysem.err.prinln("Excepion caugh: " + e); } GeLexicon The following Java code sample show how o use Java-based applicaions o produce he conen of a specific pronunciaion lexicon sored in a AWS Region. For more informaion on his operaion, see he reference for he GeLexicon API. package com.amazonaws.polly.samples; impor com.amazonaws.services.polly.amazonpolly; impor com.amazonaws.services.polly.amazonpollyclienbuilder; impor com.amazonaws.services.polly.model.gelexiconreques; impor com.amazonaws.services.polly.model.gelexiconresul; public class GeLexiconSample { privae Sring LEXICON_NAME = "SampleLexicon"; AmazonPolly clien = AmazonPollyClienBuilder.defaulClien(); public void gelexicon() { GeLexiconReques gelexiconreques = new GeLexiconReques().wihName(LEXICON_NAME); } } ry { GeLexiconResul gelexiconresul = clien.gelexicon(gelexiconreques); Sysem.ou.prinln("Lexicon: " + gelexiconresul.gelexicon()); } cach (Excepion e) { Sysem.err.prinln("Excepion caugh: " + e); } LisLexicons The following Java code sample shows how o use Java-based applicaions o produce a lis of pronunciaion lexicons sored in an AWS Region. For more informaion on his operaion, see he reference for he LisLexicons API. package com.amazonaws.polly.samples; impor com.amazonaws.services.polly.amazonpolly; impor com.amazonaws.services.polly.amazonpollyclienbuilder; impor com.amazonaws.services.polly.model.lexiconaribues; impor com.amazonaws.services.polly.model.lexicondescripion; impor com.amazonaws.services.polly.model.lislexiconsreques; impor com.amazonaws.services.polly.model.lislexiconsresul; public class LisLexiconsSample { AmazonPolly clien = AmazonPollyClienBuilder.defaulClien(); public void lislexicons() { LisLexiconsReques lislexiconsreques = new LisLexiconsReques(); ry { 112

118 Java Samples Sring nextoken; do { LisLexiconsResul lislexiconsresul = clien.lislexicons(lislexiconsreques); nextoken = lislexiconsresul.genextoken(); lislexiconsreques.senextoken(nextoken); for (LexiconDescripion lexicondescripion : lislexiconsresul.gelexicons()) { LexiconAribues aribues = lexicondescripion.gearibues(); Sysem.ou.prinln("Name: " + lexicondescripion.gename() + ", Alphabe: " + aribues.gealphabe() + ", LanguageCode: " + aribues.gelanguagecode() + ", LasModified: " + aribues.gelasmodified() + ", LexemesCoun: " + aribues.gelexemescoun() + ", LexiconArn: " + aribues.gelexiconarn() + ", Size: " + aribues.gesize()); } } while (nextoken!= null); } cach (Excepion e) { Sysem.err.prinln("Excepion caugh: " + e); } } } PuLexicon The following Java code sample show how o use Java-based applicaions o sore a pronunciaion lexicon in an AWS Region. For more informaion on his operaion, see he reference for he PuLexicon API. package com.amazonaws.polly.samples; impor com.amazonaws.services.polly.amazonpolly; impor com.amazonaws.services.polly.amazonpollyclienbuilder; impor com.amazonaws.services.polly.model.pulexiconreques; public class PuLexiconSample { AmazonPolly clien = AmazonPollyClienBuilder.defaulClien(); privae Sring LEXICON_CONTENT = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + "<lexicon version=\"1.0\" xmlns=\"hp:// xmlns:xsi=\"hp:// " + "xsi:schemalocaion=\"hp:// hp:// " + "alphabe=\"ipa\" xml:lang=\"en-us\">" + "<lexeme><grapheme>es1</grapheme><alias>es2</alias></lexeme>" + "</lexicon>"; privae Sring LEXICON_NAME = "SampleLexicon"; public void pulexicon() { PuLexiconReques pulexiconreques = new PuLexiconReques().wihConen(LEXICON_CONTENT).wihName(LEXICON_NAME); } } ry { clien.pulexicon(pulexiconreques); } cach (Excepion e) { Sysem.err.prinln("Excepion caugh: " + e); } 113

119 Java Samples Speech Marks The following code sample shows how o use Java-based applicaions o synhesize speech marks for inpued ex. This funcionaliy uses he SynhesizeSpeech API. For more informaion on his funcionaliy, see Speech Marks (p. 14). For more informaion on he API, see he reference for SynhesizeSpeech API. package com.amazonaws.polly.samples; impor com.amazonaws.services.polly.amazonpolly; impor com.amazonaws.services.polly.amazonpollyclienbuilder; impor com.amazonaws.services.polly.model.oupuforma; impor com.amazonaws.services.polly.model.speechmarktype; impor com.amazonaws.services.polly.model.synhesizespeechreques; impor com.amazonaws.services.polly.model.synhesizespeechresul; impor com.amazonaws.services.polly.model.voiceid; impor java.io.file; impor java.io.fileoupusream; impor java.io.inpusream; public class SynhesizeSpeechMarksSample { AmazonPolly clien = AmazonPollyClienBuilder.defaulClien(); public void synhesizespeechmarks() { Sring oupufilename = "/mp/speechmarks.json"; SynhesizeSpeechReques synhesizespeechreques = new SynhesizeSpeechReques().wihOupuForma(OupuForma.Json).wihSpeechMarkTypes(SpeechMarkType.Viseme, SpeechMarkType.Word).wihVoiceId(VoiceId.Joanna).wihTex("This is a sample ex o be synhesized."); ry (FileOupuSream oupusream = new FileOupuSream(new File(oupuFileName))) { SynhesizeSpeechResul synhesizespeechresul = clien.synhesizespeech(synhesizespeechreques); bye[] buffer = new bye[2 * 1024]; in readbyes; } } ry (InpuSream in = synhesizespeechresul.geaudiosream()){ while ((readbyes = in.read(buffer)) > 0) { oupusream.wrie(buffer, 0, readbyes); } } } cach (Excepion e) { Sysem.err.prinln("Excepion caugh: " + e); } SynhesizeSpeech The following Java code sample show how o use Java-based applicaions o synhesize speech from for inpued ex. For more informaion, see he reference for SynhesizeSpeech API. package com.amazonaws.polly.samples; 114

120 Pyhon Samples impor com.amazonaws.services.polly.amazonpolly; impor com.amazonaws.services.polly.amazonpollyclienbuilder; impor com.amazonaws.services.polly.model.oupuforma; impor com.amazonaws.services.polly.model.synhesizespeechreques; impor com.amazonaws.services.polly.model.synhesizespeechresul; impor com.amazonaws.services.polly.model.voiceid; impor java.io.file; impor java.io.fileoupusream; impor java.io.inpusream; public class SynhesizeSpeechSample { AmazonPolly clien = AmazonPollyClienBuilder.defaulClien(); public void synhesizespeech() { Sring oupufilename = "/mp/speech.mp3"; SynhesizeSpeechReques synhesizespeechreques = new SynhesizeSpeechReques().wihOupuForma(OupuForma.Mp3).wihVoiceId(VoiceId.Joanna).wihTex("This is a sample ex o be synhesized."); ry (FileOupuSream oupusream = new FileOupuSream(new File(oupuFileName))) { SynhesizeSpeechResul synhesizespeechresul = clien.synhesizespeech(synhesizespeechreques); bye[] buffer = new bye[2 * 1024]; in readbyes; } } ry (InpuSream in = synhesizespeechresul.geaudiosream()){ while ((readbyes = in.read(buffer)) > 0) { oupusream.wrie(buffer, 0, readbyes); } } } cach (Excepion e) { Sysem.err.prinln("Excepion caugh: " + e); } Pyhon Samples The following code samples show how o use Pyhon (boo3)-based applicaions o accomplish various asks wih Amazon Polly. These samples are no inended o be full examples, bu can be included in larger Pyhon applicaions ha use he AWS SDK for Pyhon (Boo). Code Snipppes PuLexicon (p. 115) GeLexicon (p. 116) LisLexicon (p. 117) DeleeLexicon (p. 118) PuLexicon The following code sample show how o use Pyhon (boo3)-based applicaions o sore a pronunciaion lexicon in an AWS Region. For more informaion on his operaion, see he reference for he PuLexicon API. Noe he following: 115

121 Pyhon Samples You need o updae he code by providing a local lexicon file name and a sored lexicon name. The example assumes you have lexicon files creaed in a subdirecory called pls. You need o updae he pah as appropriae. The following code example uses defaul credenials sored in he AWS SDK configuraion file. For informaion abou creaing he configuraion file, see Sep 3.1: Se Up he AWS Command Line Inerface (AWS CLI) (p. 9). from argparse impor ArgumenParser from boo3 impor Session from boocore.excepions impor BooCoreError, ClienError # Define and parse he command line argumens cli = ArgumenParser(descripion="PuLexicon example") cli.add_argumen("pah", ype=sr, meavar="file_path") cli.add_argumen("-n", "--name", ype=sr, required=true, meavar="lexicon_name", des="name") argumens = cli.parse_args() # Creae a clien using he credenials and region defined in he adminuser # secion of he AWS credenials and configuraion files session = Session(profile_name="adminuser") polly = session.clien("polly") # Open he PLS lexicon file for reading ry: wih open(argumens.pah, "r") as lexicon_file: # Read he pls file conens lexicon_daa = lexicon_file.read() # Sore he PLS lexicon on he service. # If a lexicon wih ha name already exiss, # is conens will be updaed response = polly.pu_lexicon(name=argumens.name, Conen=lexicon_daa) excep (IOError, BooCoreError, ClienError) as error: # Could no open/read he file or he service reurned an error, # exi gracefully cli.error(error) prin(u"the \"{0}\" lexicon is now available for use.".forma(argumens.name)) GeLexicon The following Pyhon code uses he AWS SDK for Pyhon (Boo) o rerieve all lexicons sored in an AWS Region. The example acceps a lexicon name as a command line parameer and feches ha lexicon only, prining ou he mp pah where i has been saved locally. The following code example uses defaul credenials sored in he AWS SDK configuraion file. For informaion abou creaing he configuraion file, see Sep 3.1: Se Up he AWS Command Line Inerface (AWS CLI) (p. 9). from argparse impor ArgumenParser from os impor pah from empfile impor geempdir from boo3 impor Session from boocore.excepions impor BooCoreError, ClienError # Define and parse he command line argumens 116

122 Pyhon Samples cli = ArgumenParser(descripion="GeLexicon example") cli.add_argumen("name", ype=sr, meavar="lexicon_name") argumens = cli.parse_args() # Creae a clien using he credenials and region defined in he adminuser # secion of he AWS credenials and configuraion files session = Session(profile_name="adminuser") polly = session.clien("polly") prin(u"feching {0}...".forma(argumens.name)) ry: # Fech lexicon by name response = polly.ge_lexicon(name=argumens.name) excep (BooCoreError, ClienError) as error: # The service reurned an error, exi gracefully cli.error(error) # Ge he lexicon daa from he response lexicon = response.ge("lexicon", {}) # Access he lexicon's conen if "Conen" in lexicon: oupu = pah.join(geempdir(), u"%s.pls" % argumens.name) prin(u"saving o %s..." % oupu) ry: # Save he lexicon conens o a local file wih open(oupu, "w") as pls_file: pls_file.wrie(lexicon["conen"]) excep IOError as error: # Could no wrie o file, exi gracefully cli.error(error) else: # The response didn' conain lexicon daa, exi gracefully cli.error("could no fech lexicons conens") prin("done.") LisLexicon The following Pyhon code example uses he AWS SDK for Pyhon (Boo) o lis he lexicons in your accoun in he region specified in your local AWS configuraion. For informaion abou creaing he configuraion file, see Sep 3.1: Se Up he AWS Command Line Inerface (AWS CLI) (p. 9). impor sys from boo3 impor Session from boocore.excepions impor BooCoreError, ClienError # Creae a clien using he credenials and region defined in he adminuser # secion of he AWS credenials and configuraion files session = Session(profile_name="adminuser") polly = session.clien("polly") ry: # Reques he lis of available lexicons response = polly.lis_lexicons() excep (BooCoreError, ClienError) as error: # The service reurned an error, exi gracefully prin(error) sys.exi(-1) # Ge he lis of lexicons in he response 117

123 Example Applicaions lexicons = response.ge("lexicons", []) prin("{0} lexicon(s) found".forma(len(lexicons))) # Oupu a formaed lis of lexicons wih some of he aribues for lexicon in lexicons: prin((u" - {Name} ({Aribues[LanguageCode]}), " "{Aribues[LexemesCoun]} lexeme(s)").forma(**lexicon)) DeleeLexicon The following Pyhon code example uses he AWS SDK for Pyhon (Boo) o delee a lexicon in he region specified in your local AWS configuraion. The example delees only he specified lexicon. I asks you o confirm ha you wan o proceed before acually deleing he lexicon. The following code example uses defaul credenials sored in he AWS SDK configuraion file. For informaion abou creaing he configuraion file, see Sep 3.1: Se Up he AWS Command Line Inerface (AWS CLI) (p. 9). from argparse impor ArgumenParser from sys impor version_info from boo3 impor Session from boocore.excepions impor BooCoreError, ClienError # Define and parse he command line argumens cli = ArgumenParser(descripion="DeleeLexicon example") cli.add_argumen("name", ype=sr, meavar="lexicon_name") argumens = cli.parse_args() # Creae a clien using he credenials and region defined in he adminuser # secion of he AWS credenials and configuraion files session = Session(profile_name="adminuser") polly = session.clien("polly") # Reques confirmaion promp = inpu if version_info >= (3, 0) else raw_inpu proceed = promp((u"this will delee he \"{0}\" lexicon," " do you wan o proceed? [y,n]: ").forma(argumens.name)) if proceed in ("y", "Y"): prin(u"deleing {0}...".forma(argumens.name)) ry: # Reques deleion of a lexicon by name response = polly.delee_lexicon(name=argumens.name) excep (BooCoreError, ClienError) as error: # The service reurned an error, exi gracefully cli.error(error) prin("done.") else: prin("cancelled.") Example Applicaions This secion conains addiional examples, in he form of example applicaions which can be used o explore Amazon Polly. Example Applicaions by Programming Language 118

124 Pyhon Example Pyhon Example (HTML5 Clien and Pyhon Server) (p. 119) Java Example (p. 128) ios Example (p. 132) Android Example (p. 134) Pyhon Example (HTML5 Clien and Pyhon Server) This example applicaion consiss of he following: An HTTP 1.1 server using he HTTP chunked ransfer coding (see Chunked Transfer Coding) A simple HTML5 user inerface ha ineracs wih he HTTP 1.1 server (shown below): The goal of his example is o show how o use Amazon Polly o sream speech from a browser-based HTML5 applicaion. Consuming he audio sream produced by Amazon Polly as he ex ges synhesized is he recommended approach for use cases where responsiveness is an imporan facor (for example, dialog sysems, screen readers, ec.). To run his example applicaion you need he following: Web browser complian wih he HTML5 and EcmaScrip5 sandards (for example, Chrome 23.0 or higher, Firefox 21.0 or higher, Inerne Explorer 9.0, or higher) Pyhon version greaer han 3.0 To es he applicaion 1. Save he server code as server.py. For he code, see Pyhon Example: Pyhon Server Code (server.py) (p. 123). 2. Save he HTML5 clien code as index.hml. For he code, see Pyhon Example: HTML5 User Inerface (index.hml) (p. 120). 3. Run he following command from he pah where you saved server.py o sar he applicaion (on some sysems you migh need o use pyhon3 insead of pyhon when running he command). 119

125 Pyhon Example $ pyhon server.py Afer he applicaion sars, a URL appears on he erminal. 4. Open he URL shown in he erminal in a web browser. You can pass he address and por for he applicaion server o use as a parameer o server.py. For more informaion, run pyhon server.py -h. 5. To lisen o speech, choose a voice from he lis, ype some ex, and hen choose Read. The speech sars playing as soon as Amazon Polly ransfers he firs usable chunk of audio daa. 6. To sop he Pyhon server when you're finished esing he applicaion, press Crl+C in he erminal where he server is running. Noe The server creaes a Boo3 clien using he AWS SDK for Pyhon (Boo). The clien uses he credenials sored in he AWS config file on your compuer o sign and auhenicae he requess o Amazon Polly. For more informaion on how o creae he AWS config file and sore credenials, see Configuring he AWS Command Line Inerface in he AWS Command Line Inerface User Guide. Pyhon Example: HTML5 User Inerface (index.hml) This secion provides he code for he HTML5 clien described in Pyhon Example (HTML5 Clien and Pyhon Server) (p. 119). <hml> <head> <ile>tex-o-speech Example Applicaion</ile> <scrip> /* * This sample code requires a web browser wih suppor for boh he * HTML5 and ECMAScrip 5 sandards; he following is a non-comprehensive * lis of complian browsers and heir minimum version: * * - Chrome * - Firefox * - Inerne Explorer 9.0+ * - Edge * - Opera * - Safari 6.1+ * - Android (sock web browser) 4.4+ * - Chrome for Android * - Firefox for Android * - Opera Mobile * - ios (Safari Mobile and Chrome) 3.2+ * - Inerne Explorer Mobile * - Blackberry Browser */ // Mapping of he OupuForma parameer of he SynhesizeSpeech API // and he audio forma srings undersood by he browser var AUDIO_FORMATS = { 'ogg_vorbis': 'audio/ogg', 'mp3': 'audio/mpeg', 'pcm': 'audio/wave; codecs=1' }; /** 120

126 Pyhon Example * Handles feching JSON over HTTP */ funcion fechjson(mehod, url, onsuccess, onerror) { var reques = new XMLHpReques(); reques.open(mehod, url, rue); reques.onload = funcion () { // If loading is complee if (reques.readysae === 4) { // if he reques was successful if (reques.saus === 200) { var daa; // Parse he JSON in he response ry { daa = JSON.parse(reques.responseTex); } cach (error) { onerror(reques.saus, error.osring()); } }; } onsuccess(daa); } else { onerror(reques.saus, reques.responsetex) } } reques.send(); /** * Reurns a lis of audio formas suppored by he browser */ funcion gesupporedaudioformas(player) { reurn Objec.keys(AUDIO_FORMATS).filer(funcion (forma) { var suppored = player.canplaytype(audio_formats[forma]); reurn suppored === 'probably' suppored === 'maybe'; }); } // Iniialize he applicaion when he DOM is loaded and ready o be // manipulaed documen.addevenlisener("domconenloaded", funcion () { var inpu = documen.geelemenbyid('inpu'), voicemenu = documen.geelemenbyid('voice'), ex = documen.geelemenbyid('ex'), player = documen.geelemenbyid('player'), submi = documen.geelemenbyid('submi'), supporedformas = gesupporedaudioformas(player); // Display a message and don' allow submiing he form if he // browser doesn' suppor any of he available audio formas if (supporedformas.lengh === 0) { submi.disabled = rue; aler('the web browser in use does no suppor any of he' + ' available audio formas. Please ry wih a differen' + ' one.'); } // Play he audio sream when he form is submied successfully inpu.addevenlisener('submi', funcion (even) { // Validae he fields in he form, display a message if // unexpeced values are encounered if (voicemenu.selecedindex <= 0 ex.value.lengh === 0) { aler('please fill in all he fields.'); } else { 121

127 Pyhon Example var selecedvoice = voicemenu.opions[voicemenu.selecedindex].value; } // Poin he player o he sreaming server player.src = '/read?voiceid=' + encodeuricomponen(selecedvoice) + '&ex=' + encodeuricomponen(ex.value) + '&oupuforma=' + supporedformas[0]; player.play(); }); // Sop he form from submiing, // Submiing he form is allowed only if he browser doesn' // suppor Javascrip o ensure funcionaliy in such a case even.prevendefaul(); // Load he lis of available voices and display hem in a menu fechjson('get', '/voices', // If he reques succeeds funcion (voices) { var conainer = documen.creaedocumenfragmen(); // Build he lis of opions for he menu voices.foreach(funcion (voice) { var opion = documen.creaeelemen('opion'); opion.value = voice['id']; opion.innerhtml = voice['name'] + ' (' + voice['gender'] + ', ' + voice['languagename'] + ')'; conainer.appendchild(opion); }); }); // Add he opions o he menu and enable he form field voicemenu.appendchild(conainer); voicemenu.disabled = false; }, // If he reques fails funcion (saus, response) { // Display a message in case loading daa from he server // fails aler(saus + ' - ' + response); }); </scrip> <syle> #inpu { min-widh: 100px; max-widh: 600px; margin: 0 auo; padding: 50px; } #inpu div { margin-boom: 20px; } #ex { widh: 100%; heigh: 200px; display: block; } #submi { 122

128 Pyhon Example widh: 100%; } </syle> </head> <body> <form id="inpu" mehod="get" acion="/read"> <div> <label for="voice">selec a voice:</label> <selec id="voice" name="voiceid" disabled> <opion value="">choose a voice...</opion> </selec> </div> <div> <label for="ex">tex o read:</label> <exarea id="ex" maxlengh="1000" minlengh="1" name="ex" placeholder="type some ex here..."></exarea> </div> <inpu ype="submi" value="read" id="submi" /> </form> <audio id="player"></audio> </body> </hml> Pyhon Example: Pyhon Server Code (server.py) This secion provides he code for he Pyhon server described in Pyhon Example (HTML5 Clien and Pyhon Server) (p. 119). """ Example Pyhon 2.7+/3.3+ Applicaion This applicaion consiss of a HTTP 1.1 server using he HTTP chunked ransfer coding (hps://ools.ief.org/hml/rfc2616#secion-3.6.1) and a minimal HTML5 user inerface ha ineracs wih i. The goal of his example is o sar sreaming he speech o he clien (he HTML5 web UI) as soon as he firs consumable chunk of speech is reurned in order o sar playing he audio as soon as possible. For use cases where low laency and responsiveness are srong requiremens, his is he recommended approach. The service documenaion conains examples for non-sreaming use cases where waiing for he speech synhesis o complee and feching he whole audio sream a once are an opion. To es he applicaion, run 'pyhon server.py' and hen open he URL displayed in he erminal in a web browser (see index.hml for a lis of suppored browsers). The address and por for he server can be passed as parameers o server.py. For more informaion, run: 'pyhon server.py -h' """ from argparse impor ArgumenParser from collecions impor nameduple from conexlib impor closing from io impor ByesIO from json impor dumps as json_encode impor os impor sys if sys.version_info >= (3, 0): from hp.server impor BaseHTTPRequesHandler, HTTPServer from sockeserver impor ThreadingMixIn from urllib.parse impor parse_qs 123

129 Pyhon Example else: from BaseHTTPServer impor BaseHTTPRequesHandler, HTTPServer from SockeServer impor ThreadingMixIn from urlparse impor parse_qs from boo3 impor Session from boocore.excepions impor BooCoreError, ClienError ResponseSaus = nameduple("httpsaus", ["code", "message"]) ResponseDaa = nameduple("responsedaa", ["saus", "conen_ype", "daa_sream"]) # Mapping he oupu forma used in he clien o he conen ype for he # response AUDIO_FORMATS = {"ogg_vorbis": "audio/ogg", "mp3": "audio/mpeg", "pcm": "audio/wave; codecs=1"} CHUNK_SIZE = 1024 HTTP_STATUS = {"OK": ResponseSaus(code=200, message="ok"), "BAD_REQUEST": ResponseSaus(code=400, message="bad reques"), "NOT_FOUND": ResponseSaus(code=404, message="no found"), "INTERNAL_SERVER_ERROR": ResponseSaus(code=500, message="inernal server error")} PROTOCOL = "hp" ROUTE_INDEX = "/index.hml" ROUTE_VOICES = "/voices" ROUTE_READ = "/read" # Creae a clien using he credenials and region defined in he adminuser # secion of he AWS credenials and configuraion files session = Session(profile_name="adminuser") polly = session.clien("polly") class HTTPSausError(Excepion): """Excepion wrapping a value from hp.server.httpsaus""" def ini (self, saus, descripion=none): """ Consrucs an error insance from a uple of (code, message, descripion), see hp.server.httpsaus """ super(httpsauserror, self). ini () self.code = saus.code self.message = saus.message self.explain = descripion class ThreadedHTTPServer(ThreadingMixIn, HTTPServer): """An HTTP Server ha handle each reques in a new hread""" daemon_hreads = True class ChunkedHTTPRequesHandler(BaseHTTPRequesHandler): """"HTTP 1.1 Chunked encoding reques handler""" # Use HTTP 1.1 as 1.0 doesn' suppor chunked encoding proocol_version = "HTTP/1.1" def query_ge(self, querydaa, key, defaul=""): """Helper for geing values from a pre-parsed query sring""" reurn querydaa.ge(key, [defaul])[0] def do_get(self): 124

130 Pyhon Example """Handles GET requess""" # Exrac values from he query sring pah, _, query_sring = self.pah.pariion('?') query = parse_qs(query_sring) response = None prin(u"[start]: Received GET for %s wih query: %s" % (pah, query)) ry: # Handle he possible reques pahs if pah == ROUTE_INDEX: response = self.roue_index(pah, query) elif pah == ROUTE_VOICES: response = self.roue_voices(pah, query) elif pah == ROUTE_READ: response = self.roue_read(pah, query) else: response = self.roue_no_found(pah, query) self.send_headers(response.saus, response.conen_ype) self.sream_daa(response.daa_sream) excep HTTPSausError as err: # Respond wih an error and log debug # informaion if sys.version_info >= (3, 0): self.send_error(err.code, err.message, err.explain) else: self.send_error(err.code, err.message) self.log_error(u"%s %s %s - [%d] %s", self.clien_address[0], self.command, self.pah, err.code, err.explain) prin("[end]") def roue_no_found(self, pah, query): """Handles rouing for unexpeced pahs""" raise HTTPSausError(HTTP_STATUS["NOT_FOUND"], "Page no found") def roue_index(self, pah, query): """Handles rouing for he applicaion's enry poin'""" ry: reurn ResponseDaa(saus=HTTP_STATUS["OK"], conen_ype="ex_hml", # Open a binary sream for reading he index # HTML file daa_sream=open(os.pah.join(sys.pah[0], pah[1:]), "rb")) excep IOError as err: # Couldn' open he sream raise HTTPSausError(HTTP_STATUS["INTERNAL_SERVER_ERROR"], sr(err)) def roue_voices(self, pah, query): """Handles rouing for lising available voices""" params = {} voices = [] while True: ry: # Reques lis of available voices, if a coninuaion oken # was reurned by he previous call hen use i o coninue # lising response = polly.describe_voices(**params) excep (BooCoreError, ClienError) as err: 125

131 Pyhon Example # The service reurned an error raise HTTPSausError(HTTP_STATUS["INTERNAL_SERVER_ERROR"], sr(err)) # Collec all he voices voices.exend(response.ge("voices", [])) # If a coninuaion oken was reurned coninue, sop ieraing # oherwise if "NexToken" in response: params = {"NexToken": response["nextoken"]} else: break json_daa = json_encode(voices) byes_daa = byes(json_daa, "uf-8") if sys.version_info >= (3, 0) \ else byes(json_daa) reurn ResponseDaa(saus=HTTP_STATUS["OK"], conen_ype="applicaion/json", # Creae a binary sream for he JSON daa daa_sream=byesio(byes_daa)) def roue_read(self, pah, query): """Handles rouing for reading ex (speech synhesis)""" # Ge he parameers from he query sring ex = self.query_ge(query, "ex") voiceid = self.query_ge(query, "voiceid") oupuforma = self.query_ge(query, "oupuforma") # Validae he parameers, se error flag in case of unexpeced # values if len(ex) == 0 or len(voiceid) == 0 or \ oupuforma no in AUDIO_FORMATS: raise HTTPSausError(HTTP_STATUS["BAD_REQUEST"], "Wrong parameers") else: ry: # Reques speech synhesis response = polly.synhesize_speech(tex=ex, VoiceId=voiceId, OupuForma=oupuForma) excep (BooCoreError, ClienError) as err: # The service reurned an error raise HTTPSausError(HTTP_STATUS["INTERNAL_SERVER_ERROR"], sr(err)) reurn ResponseDaa(saus=HTTP_STATUS["OK"], conen_ype=audio_formats[oupuforma], # Access he audio sream in he response daa_sream=response.ge("audiosream")) def send_headers(self, saus, conen_ype): """Send ou he group of headers for a successful reques""" # Send HTTP headers self.send_response(saus.code, saus.message) self.send_header('conen-ype', conen_ype) self.send_header('transfer-encoding', 'chunked') self.send_header('connecion', 'close') self.end_headers() def sream_daa(self, sream): """Consumes a sream in chunks o produce he response's oupu'""" prin("sreaming sared...") if sream: 126

132 Pyhon Example # Noe: Closing he sream is imporan as he service hroles on # he number of parallel connecions. Here we are using # conexlib.closing o ensure he close mehod of he sream objec # will be called auomaically a he end of he wih saemen's # scope. wih closing(sream) as managed_sream: # Push ou he sream's conen in chunks while True: daa = managed_sream.read(chunk_size) self.wfile.wrie(b"%x\r\n%s\r\n" % (len(daa), daa)) # If here's no more daa o read, sop sreaming if no daa: break # Ensure any buffered oupu has been ransmied and close he # sream self.wfile.flush() prin("sreaming compleed.") else: # The sream passed in is empy self.wfile.wrie(b"0\r\n\r\n") prin("nohing o sream.") # Define and parse he command line argumens cli = ArgumenParser(descripion='Example Pyhon Applicaion') cli.add_argumen( "-p", "--por", ype=in, meavar="port", des="por", defaul=8000) cli.add_argumen( "--hos", ype=sr, meavar="host", des="hos", defaul="localhos") argumens = cli.parse_args() # If he module is invoked direcly, iniialize he applicaion if name == ' main ': # Creae and configure he HTTP server insance server = ThreadedHTTPServer((argumens.hos, argumens.por), ChunkedHTTPRequesHandler) prin("saring server, use <Crl-C> o sop...") prin(u"open {0}://{1}:{2}{3} in a web browser.".forma(protocol, argumens.hos, argumens.por, ROUTE_INDEX)) ry: # Lisen for requess indefiniely server.serve_forever() excep KeyboardInerrup: # A reques o erminae has been received, sop he server prin("\nshuing down...") server.socke.close() 127

133 Java Example Java Example This example shows how o use Amazon Polly o sream speech from a Java-based applicaion. The example uses he AWS SDK for Java o read he specified ex using a voice seleced from a lis. The code shown covers major asks, bu does only minimal error checking. If Amazon Polly encouners an error, he applicaion erminaes. To run his example applicaion, you need he following: Java 8 Java Developmen Ki (JDK) AWS SDK for Java Apache Maven To es he applicaion 1. Ensure ha he JAVA_HOME environmen variable is se for he JDK. For example, if you insalled JDK 1.8.0_121 on Windows a C:\Program Files\Java \jdk1.8.0_121, you would ype he following a he command promp: se JAVA_HOME=""C:\Program Files\Java\jdk1.8.0_121"" If you insalled JDK 1.8.0_121 in Linux a /usr/lib/jvm/java8-openjdk-amd64, you would ype he following a he command promp: expor JAVA_HOME=/usr/lib/jvm/java8-openjdk-amd64 2. Se he Maven environmen variables o run Maven from he command line. For example, if you insalled Maven on Windows a C:\Program Files\apachemaven-3.3.9, you would ype he following: se M2_HOME=""C:\Program Files\apache-maven-3.3.9"" se M2=%M2_HOME%\bin se PATH=%M2%;%PATH% If you insalled Maven on Linux a /home/ec2-user/op/apache-maven-3.3.9, you would ype he following: expor M2_HOME=/home/ec2-user/op/apache-maven expor M2=$M2_HOME/bin expor PATH=$M2:$PATH 3. Creae a new direcory called polly-java-demo. 4. In he polly-java-demo direcory, creae a new file called pom.xml, and pase he following code ino i: <projec xmlns="hp://maven.apache.org/pom/4.0.0" xmlns:xsi="hp:// xsi:schemalocaion="hp://maven.apache.org/pom/4.0.0 hp://maven.apache.org/xsd/ maven xsd"> <modelversion>4.0.0</modelversion> <groupid>com.amazonaws.polly</groupid> <arifacid>java-demo</arifacid> <version>0.0.1-snapshot</version> 128

134 Java Example <dependencies> <!-- hps://mvnreposiory.com/arifac/com.amazonaws/aws-java-sdk-polly --> <dependency> <groupid>com.amazonaws</groupid> <arifacid>aws-java-sdk-polly</arifacid> <version> </version> </dependency> <!-- hps://mvnreposiory.com/arifac/com.googlecode.soundlibs/jlayer --> <dependency> <groupid>com.googlecode.soundlibs</groupid> <arifacid>jlayer</arifacid> <version> </version> </dependency> </dependencies> <build> <plugins> <plugin> <groupid>org.codehaus.mojo</groupid> <arifacid>exec-maven-plugin</arifacid> <version>1.2.1</version> <execuions> <execuion> <goals> <goal>java</goal> </goals> </execuion> </execuions> <configuraion> <mainclass>com.amazonaws.demos.polly.pollydemo</mainclass> </configuraion> </plugin> </plugins> </build> </projec> 5. Creae a new direcory called polly a src/main/java/com/amazonaws/demos. 6. In he polly direcory, creae a new Java source file called PollyDemo.java, and pase in he following code: package com.amazonaws.demos.polly; impor java.io.ioexcepion; impor java.io.inpusream; impor com.amazonaws.clienconfiguraion; impor com.amazonaws.auh.defaulawscredenialsproviderchain; impor com.amazonaws.regions.region; impor com.amazonaws.regions.regions; impor com.amazonaws.services.polly.amazonpollyclien; impor com.amazonaws.services.polly.model.describevoicesreques; impor com.amazonaws.services.polly.model.describevoicesresul; impor com.amazonaws.services.polly.model.oupuforma; impor com.amazonaws.services.polly.model.synhesizespeechreques; impor com.amazonaws.services.polly.model.synhesizespeechresul; impor com.amazonaws.services.polly.model.voice; impor javazoom.jl.player.advanced.advancedplayer; impor javazoom.jl.player.advanced.playbackeven; impor javazoom.jl.player.advanced.playbacklisener; public class PollyDemo { 129

135 Java Example privae final AmazonPollyClien polly; privae final Voice voice; privae saic final Sring SAMPLE = "Congraulaions. You have successfully buil his working demo of Amazon Polly in Java. Have fun building voice enabled apps wih Amazon Polly (ha's me!), and always look a he AWS websie for ips and ricks on using Amazon Polly and oher grea services from AWS"; public PollyDemo(Region region) { // creae an Amazon Polly clien in a specific region polly = new AmazonPollyClien(new DefaulAWSCredenialsProviderChain(), new ClienConfiguraion()); polly.seregion(region); // Creae describe voices reques. DescribeVoicesReques describevoicesreques = new DescribeVoicesReques(); // Synchronously ask Amazon Polly o describe available TTS voices. DescribeVoicesResul describevoicesresul = polly.describevoices(describevoicesreques); voice = describevoicesresul.gevoices().ge(0); } public InpuSream synhesize(sring ex, OupuForma forma) hrows IOExcepion { SynhesizeSpeechReques synhreq = new SynhesizeSpeechReques().wihTex(ex).wihVoiceId(voice.geId()).wihOupuForma(forma); SynhesizeSpeechResul synhres = polly.synhesizespeech(synhreq); reurn synhres.geaudiosream(); } public saic void main(sring args[]) hrows Excepion { //creae he es class PollyDemo helloworld = new PollyDemo(Region.geRegion(Regions.US_EAST_1)); //ge he audio sream InpuSream speechsream = helloworld.synhesize(sample, OupuForma.Mp3); //creae an MP3 player AdvancedPlayer player = new AdvancedPlayer(speechSream, javazoom.jl.player.facoryregisry.sysemregisry().creaeaudiodevice()); player.seplaybacklisener(new PlaybackLisener() public void playbacksared(playbackeven ev) { Sysem.ou.prinln("Playback sared"); Sysem.ou.prinln(SAMPLE); public void playbackfinished(playbackeven ev) { Sysem.ou.prinln("Playback finished"); } }); } } // play i! player.play(); 7. Reurn o he polly-java-demo direcory o clean, compile, and execue he demo: 130

136 Java Example mvn clean compile exec:java 131

137 ios Example ios Example The following example uses he ios SDK for Amazon Polly o read he specified ex using a voice seleced from a lis of voices. The code shown here covers he major asks bu does no handle errors. For he complee code, see AWS SDK for ios Amazon Polly demo. Iniialize // Region of Amazon Polly. le AwsRegion = AWSRegionType.usEas1 // Cognio pool ID. Pool needs o be unauhenicaed pool wih // Amazon Polly permissions. le CognioIdeniyPoolId = "YourCognioIdeniyPoolId" // Iniialize he Amazon Cognio credenials provider. le credenialprovider = AWSCognioCredenialsProvider(regionType: AwsRegion, ideniypoolid: CognioIdeniyPoolId) // Creae an audio player var audioplayer = AVPlayer() Ge Lis of Available Voices // Use he configuraion as defaul AWSServiceManager.defaul().defaulServiceConfiguraion = configuraion // Ge all he voices (no parameers specified in inpu) from Amazon Polly // This creaes an async ask. le ask = AWSPolly.defaul().describeVoices(AWSPollyDescribeVoicesInpu()) // When he reques is done, asynchronously do he following block // (we ignore all he errors, bu in a real-world scenario hey need // o be handled) ask.coninue(successblock: { (awstask: AWSTask) -> Any? in // awstask.resul is an insance of AWSPollyDescribeVoicesOupu in // case of he "describevoices" mehod le voices = (awstask.resul! as AWSPollyDescribeVoicesOupu).voices }) reurn nil Synhesize Speech // Firs, Amazon Polly requires an inpu, which we need o prepare. // Again, we ignore he errors, however his should be handled in // real applicaions. Here we are using he URL Builder Reques, // since in order o make he synhesis quicker we will pass he // presigned URL o he sysem audio player. le inpu = AWSPollySynhesizeSpeechURLBuilderReques() // Tex o synhesize inpu.ex = "Sample ex" // We expec he oupu in MP3 forma inpu.oupuforma = AWSPollyOupuForma.mp3 // Choose he voice ID inpu.voiceid = AWSPollyVoiceId.joanna 132

138 ios Example // Creae an ask o synhesize speech using he given synhesis inpu le builder = AWSPollySynhesizeSpeechURLBuilder.defaul().gePreSignedURL(inpu) // Reques he URL for synhesis resul builder.coninueonsuccesswih(block: { (awstask: AWSTask<NSURL>) -> Any? in // The resul of gepresignedurl ask is NSURL. // Again, we ignore he errors in he example. le url = awstask.resul! // Try playing he daa using he sysem AVAudioPlayer self.audioplayer.replacecurreniem(wih: AVPlayerIem(url: url as URL)) self.audioplayer.play() reurn nil }) 133

139 Android Example Android Example The following example uses he Android SDK for Amazon Polly o read he specified ex using a voice seleced from a lis of voices. The code shown here covers he major asks bu does no handle errors. For he complee code, see he AWS SDK for Android Amazon Polly demo. Iniialize // Cognio pool ID. Pool needs o be unauhenicaed pool wih // Amazon Polly permissions. Sring COGNITO_POOL_ID = "YourCognioIdeniyPoolId"; // Region of Amazon Polly. Regions MY_REGION = Regions.US_EAST_1; // Iniialize he Amazon Cognio credenials provider. CognioCachingCredenialsProvider credenialsprovider = new CognioCachingCredenialsProvider( geapplicaionconex(), COGNITO_POOL_ID, MY_REGION ); // Creae a clien ha suppors generaion of presigned URLs. AmazonPollyPresigningClien clien = new AmazonPollyPresigningClien(credenialsProvider); Ge Lis of Available Voices // Creae describe voices reques. DescribeVoicesReques describevoicesreques = new DescribeVoicesReques(); // Synchronously ask Amazon Polly o describe available TTS voices. DescribeVoicesResul describevoicesresul = clien.describevoices(describevoicesreques); Lis<Voice> voices = describevoicesresul.gevoices(); Ge URL for Audio Sream // Creae speech synhesis reques. SynhesizeSpeechPresignReques synhesizespeechpresignreques = new SynhesizeSpeechPresignReques() // Se he ex o synhesize..wihtex("hello world!") // Selec voice for synhesis..wihvoiceid(voices.ge(0).geid()) // "Joanna" // Se forma o MP3..wihOupuForma(OupuForma.Mp3); // Ge he presigned URL for synhesized speech audio sream. URL presignedsynhesizespeechurl = clien.gepresignedsynhesizespeechurl(synhesizespeechpresignreques); Play Synhesized Speech // Use MediaPlayer: hps://developer.android.com/guide/opics/media/mediaplayer.hml // Creae a media player o play he synhesized audio sream. MediaPlayer mediaplayer = new MediaPlayer(); mediaplayer.seaudiosreamtype(audiomanager.stream_music); 134

140 Android Example ry { // Se media player's daa source o previously obained URL. mediaplayer.sedaasource(presignedsynhesizespeechurl.osring()); } cach (IOExcepion e) { Log.e(TAG, "Unable o se daa source for he media player! " + e.gemessage()); } // Prepare he MediaPlayer asynchronously (since he daa source is a nework sream). mediaplayer.prepareasync(); // Se he callback o sar he MediaPlayer when i's prepared. mediaplayer.seonpreparedlisener(new MediaPlayer.OnPreparedLisener() public void onprepared(mediaplayer mp) { mp.sar(); } }); // Se he callback o release he MediaPlayer afer playback is compleed. mediaplayer.seoncompleionlisener(new MediaPlayer.OnCompleionLisener() public void oncompleion(mediaplayer mp) { mp.release(); } }); 135

141 Seing Up he Plugin WordPress Plugin for Amazon Polly The Amazon Polly plugin for WordPress les visiors o your WordPress websie lisen o conen in your chosen language and voice. You use he plugin o creae an audio file of your wrien conen, which your users can sream a heir convenience. Websie visiors can consume your conen using new channels, such as inline audio players and mobile applicaions.. You use he naive WordPress Add Plugins page o insall and configure he plugin. Afer you insall and acivae he plugin, you navigae o he Amazon Polly Seings page and connec he plugin o your AWS accoun. You can configure he plugin o auomaically creae audio files for new conen upon publicaion, or choose he conen individually. Archived conen can be bach processed o provide your consumers wih an enhanced experience as well. You can also use he Amazon Pollycas RSS feed o podcas he new audio conen. Topics Noe In he following procedures, insrucions for asks performed in WordPress migh no mach he WordPress user inerface exacly. Insalling he Plugin (p. 136) Soring Audio Files (p. 138) Insalling he Plugin Seing up he Amazon Polly plugin for WordPress requires ha you have an acive AWS accoun in addiion o your working WordPress insallaion. If you don' have an accoun, see Sep 1.1: Sign up for AWS (p. 6). When you have an AWS accoun, follow hese seps o finish seing up he plugin: 1. Creae a Permissions Policy (p. 136) 2. Creae an IAM User for he Plugin (p. 137) 3. Insalling and Configuring he Plugin (p. 137) Creae a Permissions Policy In he AWS Managemen Console, creae an IAM permissions policy called PollyForWordPressPolicy using he following code: { "Version": " ", "Saemen": [use { "Sid": "Permissions1", "Effec": "Allow", "Acion": [ "polly:synhesizespeech", "s3:headbucke", "polly:describevoices" ], 136

142 Creae an IAM User for he Plugin } ] }, { } "Resource": "*" "Sid": "Permissions2", "Effec": "Allow", "Acion": [ "s3:lisbucke", "s3:gebuckeacl", "s3:gebuckepolicy", "s3:puobjec, "s3:deleeobjec", "s3:creaebucke", "s3:puobjecacl" ], "Resource": "arn:aws:s3:::audio_for_wordpress*" For more informaion on creaing a permissions policy, see Creaing Cusomer-Managed Policies. Creae an IAM User for he Plugin To connec he plugin o your AWS accoun, you need o creae an AWS Ideniy and Access Managemen (IAM) user, hen aach he permissions policy o ha user. If you deployed WordPress on Amazon EC2, you can skip his sep and use he IAM role insead of an individual IAM user. For more informaion, see: IAM Roles for Amazon EC2 in he Amazon EC2 User Guide. To creae an IAM user 1. Open he IAM console a hps://console.aws.amazon.com/iam/ and choose Users. 2. Choose Add User. 3. For User Name, ype WordPress. 4. For Access Type, choose Programmaic access, hen choose Nex: Permissions. 5. Choose Aach exising policies direcion. Choose your newly creaed policy (PollyForWordPressPolicy) from he lis, hen choose Nex: Review. 6. Choose Creae User. 7. Copy he Access key ID and Secre access key. You need hem o configure he plugin. Imporan This is he only ime you can access hese keys, so be sure o record hem. Insalling and Configuring he Plugin To insall and configure he plugin 1. Download he Amazon Polly plugin for WordPress from he Amazon Polly plugin GiHub sie. 2. On he WordPress Admin page, choose Add New Plugin, hen insall and acivae he plugin. 3. On he WordPress Admin page, choose Seings, hen for Amazon Polly Seings, configure he plugin: AWS access key and AWS secre key AWS credenials, which allow he plugin o use Amazon Polly and Amazon Simple Sorage Service (Amazon S3). If you are hosing your WordPress sie on Amazon Elasic Compue Cloud (Amazon EC2), you can use AWS Ideniy and Access Managemen (IAM) roles insead of credenials. In ha case, leave hese wo fields blank. 137

143 Using he Audio Files Sample rae The sample rae of he audio files ha will be generaed, in Hz. Higher sampling raes mean higher qualiy audio. Voice name The Amazon Polly voice o use o creae he audio file. Player posiion Where o posiion he audio player on he websie. You can pu i before or afer he pos, or no use i a all. If you wan o make your files available as podcass, using Amazon Pollycas, choose o no display he audio player. New pos defaul Specifies wheher Amazon Polly is auomaically enabled for all new poss. Choose his opion if you wan Amazon Polly o use he configuraion seings o creae an audio file for each new pos. Auoplay Specifies wheher he audio player auomaically sars playing he audio when a user visis an individual pos on he websie. Sore audio in Amazon S3 If you wan o sore audio files in an S3 bucke insead of on he server, choose his opion. Amazon Polly creaes he bucke for you. For more informaion and pricing, see Amazon S3. Amazon CloudFron (CDN) domain name If you wan o broadcas your audio files wih Amazon CloudFron, provide he name of your CloudFron domain, which he plugin will use for sreaming audio. You mus firs creae he domain in Amazon CloudFron. ITunes caegory The caegory for your podcas. Choosing a caegory makes i easier for podcas users o find your podcas in he podcas caalog. ITunes explici Specifies wheher o enable Amazon Pollycas podcasing. Bulk updae all poss If you wan o conver all poss o use he new plugin seings, choose his opion. 4. Choose Save Changes Soring Audio Files When you publish conen on your sie, i's sen o Amazon Polly for synhesis. By defaul, new audio files are sored on your web server. You can also sore he files using Amazon S3 or Amazon CloudFron. The way your WordPress users lisen o he audio conen on your websie depends on where he conen is sored: 1. For audio files sored on he WordPress server, files are broadcas direcly from he server. 2. For files sored in an Amazon S3 bucke, files are broadcas from he S3 bucke. 3. If you use Amazon CloudFron (CDN), he files are sored on Amazon S3 and are broadcas wih Amazon CloudFron. 138

144 Posiioning he HTML Player Your users have he same lisening experience regardless of how you sore your audio files. Posiioning he HTML Player When you insall he Amazon Polly plugin, i displays an HTML player on your WordPress websie. You can use he Player posiion opion when configuring he plugin on he Amazon Polly Seings page o display he player above or below your ex, or no display i a all. For more informaion abou seing configuraion opions, see Insalling and Configuring he Plugin (p. 137). Podcasing wih Amazon Pollycas To le users lisen o your audio conen using sandard podcas applicaions, se up Pollycas feeds. RSS 2.0-complian Pollycas feeds provide he necessary XML daa for aggregaion by popular podcas mobile applicaions and podcas direcories, such as itunes. The Amazon Polly plugin auomaically adds Amazon Pollycas endpoins o all WordPress archive URLs. This les you syndicae boh sie-wide or argeed podcass. You can also add Amazon Pollycas endpoins manually by adding /amazon-pollycas/ o he URL for a page in a podcasing applicaion. For example: example.com/amazon-pollycas/ example.com/caegory/news/amazon-pollycas/ 139

Neural Network Model of the Backpropagation Algorithm

Neural Network Model of the Backpropagation Algorithm Neural Nework Model of he Backpropagaion Algorihm Rudolf Jakša Deparmen of Cyberneics and Arificial Inelligence Technical Universiy of Košice Lená 9, 4 Košice Slovakia jaksa@neuron.uke.sk Miroslav Karák

More information

1 Language universals

1 Language universals AS LX 500 Topics: Language Uniersals Fall 2010, Sepember 21 4a. Anisymmery 1 Language uniersals Subjec-erb agreemen and order Bach (1971) discusses wh-quesions across SO and SO languages, hypohesizing:...

More information

An Effiecient Approach for Resource Auto-Scaling in Cloud Environments

An Effiecient Approach for Resource Auto-Scaling in Cloud Environments Inernaional Journal of Elecrical and Compuer Engineering (IJECE) Vol. 6, No. 5, Ocober 2016, pp. 2415~2424 ISSN: 2088-8708, DOI: 10.11591/ijece.v6i5.10639 2415 An Effiecien Approach for Resource Auo-Scaling

More information

MyLab & Mastering Business

MyLab & Mastering Business MyLab & Masering Business Efficacy Repor 2013 MyLab & Masering: Business Efficacy Repor 2013 Edied by Michelle D. Speckler 2013 Pearson MyAccouningLab, MyEconLab, MyFinanceLab, MyMarkeingLab, and MyOMLab

More information

More Accurate Question Answering on Freebase

More Accurate Question Answering on Freebase More Accurae Quesion Answering on Freebase Hannah Bas, Elmar Haussmann Deparmen of Compuer Science Universiy of Freiburg 79110 Freiburg, Germany {bas, haussmann}@informaik.uni-freiburg.de ABSTRACT Real-world

More information

Fast Multi-task Learning for Query Spelling Correction

Fast Multi-task Learning for Query Spelling Correction Fas Muli-ask Learning for Query Spelling Correcion Xu Sun Dep. of Saisical Science Cornell Universiy Ihaca, NY 14853 xusun@cornell.edu Anshumali Shrivasava Dep. of Compuer Science Cornell Universiy Ihaca,

More information

Information Propagation for informing Special Population Subgroups about New Ground Transportation Services at Airports

Information Propagation for informing Special Population Subgroups about New Ground Transportation Services at Airports Downloaded from ascelibrary.org by Basil Sephanis on 07/13/16. Copyrigh ASCE. For personal use only; all righs reserved. Informaion Propagaion for informing Special Populaion Subgroups abou New Ground

More information

Channel Mapping using Bidirectional Long Short-Term Memory for Dereverberation in Hands-Free Voice Controlled Devices

Channel Mapping using Bidirectional Long Short-Term Memory for Dereverberation in Hands-Free Voice Controlled Devices Z. Zhang e al.: Channel Mapping using Bidirecional Long Shor-Term Memory for Dereverberaion in Hands-Free Voice Conrolled Devices 525 Channel Mapping using Bidirecional Long Shor-Term Memory for Dereverberaion

More information

Appendix L: Online Testing Highlights and Script

Appendix L: Online Testing Highlights and Script Online Testing Highlights and Script for Fall 2017 Ohio s State Tests Administrations Test administrators must use this document when administering Ohio s State Tests online. It includes step-by-step directions,

More information

Spring 2015 Achievement Grades 3 to 8 Social Studies and End of Course U.S. History Parent/Teacher Guide to Online Field Test Electronic Practice

Spring 2015 Achievement Grades 3 to 8 Social Studies and End of Course U.S. History Parent/Teacher Guide to Online Field Test Electronic Practice Spring 2015 Achievement Grades 3 to 8 Social Studies and End of Course U.S. History Parent/Teacher Guide to Online Field Test Electronic Practice Assessment Tests (epats) FAQs, Instructions, and Hardware

More information

Linguistics 220 Phonology: distributions and the concept of the phoneme. John Alderete, Simon Fraser University

Linguistics 220 Phonology: distributions and the concept of the phoneme. John Alderete, Simon Fraser University Linguistics 220 Phonology: distributions and the concept of the phoneme John Alderete, Simon Fraser University Foundations in phonology Outline 1. Intuitions about phonological structure 2. Contrastive

More information

The Journey to Vowelerria VOWEL ERRORS: THE LOST WORLD OF SPEECH INTERVENTION. Preparation: Education. Preparation: Education. Preparation: Education

The Journey to Vowelerria VOWEL ERRORS: THE LOST WORLD OF SPEECH INTERVENTION. Preparation: Education. Preparation: Education. Preparation: Education VOWEL ERRORS: THE LOST WORLD OF SPEECH INTERVENTION The Journey to Vowelerria An adventure across familiar territory child speech intervention leading to uncommon terrain vowel errors, Ph.D., CCC-SLP 03-15-14

More information

Getting Started Guide

Getting Started Guide Getting Started Guide Getting Started with Voki Classroom Oddcast, Inc. Published: July 2011 Contents: I. Registering for Voki Classroom II. Upgrading to Voki Classroom III. Getting Started with Voki Classroom

More information

Read&Write Gold is a software application and can be downloaded in Macintosh or PC version directly from https://download.uky.edu

Read&Write Gold is a software application and can be downloaded in Macintosh or PC version directly from https://download.uky.edu UK 101 - READ&WRITE GOLD LESSON PLAN I. Goal: Students will be able to describe features of Read&Write Gold that will benefit themselves and/or their peers. II. Materials: There are two options for demonstrating

More information

PowerTeacher Gradebook User Guide PowerSchool Student Information System

PowerTeacher Gradebook User Guide PowerSchool Student Information System PowerSchool Student Information System Document Properties Copyright Owner Copyright 2007 Pearson Education, Inc. or its affiliates. All rights reserved. This document is the property of Pearson Education,

More information

My First Spanish Phrases (Speak Another Language!) By Jill Kalz

My First Spanish Phrases (Speak Another Language!) By Jill Kalz My First Spanish Phrases (Speak Another Language!) By Jill Kalz If you are searching for the ebook by Jill Kalz My First Spanish Phrases (Speak Another Language!) in pdf form, then you have come on to

More information

Developing Grammar in Context

Developing Grammar in Context Developing Grammar in Context intermediate with answers Mark Nettle and Diana Hopkins PUBLISHED BY THE PRESS SYNDICATE OF THE UNIVERSITY OF CAMBRIDGE The Pitt Building, Trumpington Street, Cambridge, United

More information

Android App Development for Beginners

Android App Development for Beginners Description Android App Development for Beginners DEVELOP ANDROID APPLICATIONS Learning basics skills and all you need to know to make successful Android Apps. This course is designed for students who

More information

Houghton Mifflin Online Assessment System Walkthrough Guide

Houghton Mifflin Online Assessment System Walkthrough Guide Houghton Mifflin Online Assessment System Walkthrough Guide Page 1 Copyright 2007 by Houghton Mifflin Company. All Rights Reserved. No part of this document may be reproduced or transmitted in any form

More information

Quick Reference for itslearning

Quick Reference for itslearning Quick Reference for itslearning Frequently Asked Questions... 2 How do I access itslearning?... 2 Who can I contact if I get a problem?... 2 Where can I get help?... 2 Can I get itslearning in my language?...

More information

STUDENT MOODLE ORIENTATION

STUDENT MOODLE ORIENTATION BAKER UNIVERSITY SCHOOL OF PROFESSIONAL AND GRADUATE STUDIES STUDENT MOODLE ORIENTATION TABLE OF CONTENTS Introduction to Moodle... 2 Online Aptitude Assessment... 2 Moodle Icons... 6 Logging In... 8 Page

More information

Outreach Connect User Manual

Outreach Connect User Manual Outreach Connect A Product of CAA Software, Inc. Outreach Connect User Manual Church Growth Strategies Through Sunday School, Care Groups, & Outreach Involving Members, Guests, & Prospects PREPARED FOR:

More information

Tour. English Discoveries Online

Tour. English Discoveries Online Techno-Ware Tour Of English Discoveries Online Online www.englishdiscoveries.com http://ed242us.engdis.com/technotms Guided Tour of English Discoveries Online Background: English Discoveries Online is

More information

The analysis starts with the phonetic vowel and consonant charts based on the dataset:

The analysis starts with the phonetic vowel and consonant charts based on the dataset: Ling 113 Homework 5: Hebrew Kelli Wiseth February 13, 2014 The analysis starts with the phonetic vowel and consonant charts based on the dataset: a) Given that the underlying representation for all verb

More information

Moodle 2 Assignments. LATTC Faculty Technology Training Tutorial

Moodle 2 Assignments. LATTC Faculty Technology Training Tutorial LATTC Faculty Technology Training Tutorial Moodle 2 Assignments This tutorial begins with the instructor already logged into Moodle 2. http://moodle.lattc.edu/ Faculty login id is same as email login id.

More information

Using Moodle in ESOL Writing Classes

Using Moodle in ESOL Writing Classes The Electronic Journal for English as a Second Language September 2010 Volume 13, Number 2 Title Moodle version 1.9.7 Using Moodle in ESOL Writing Classes Publisher Author Contact Information Type of product

More information

Session Six: Software Evaluation Rubric Collaborators: Susan Ferdon and Steve Poast

Session Six: Software Evaluation Rubric Collaborators: Susan Ferdon and Steve Poast EDTECH 554 (FA10) Susan Ferdon Session Six: Software Evaluation Rubric Collaborators: Susan Ferdon and Steve Poast Task The principal at your building is aware you are in Boise State's Ed Tech Master's

More information

English for Life. B e g i n n e r. Lessons 1 4 Checklist Getting Started. Student s Book 3 Date. Workbook. MultiROM. Test 1 4

English for Life. B e g i n n e r. Lessons 1 4 Checklist Getting Started. Student s Book 3 Date. Workbook. MultiROM. Test 1 4 Lessons 1 4 Checklist Getting Started Lesson 1 Lesson 2 Lesson 3 Lesson 4 Introducing yourself Numbers 0 10 Names Indefinite articles: a / an this / that Useful expressions Classroom language Imperatives

More information

Introduction to Moodle

Introduction to Moodle Center for Excellence in Teaching and Learning Mr. Philip Daoud Introduction to Moodle Beginner s guide Center for Excellence in Teaching and Learning / Teaching Resource This manual is part of a serious

More information

Five Challenges for the Collaborative Classroom and How to Solve Them

Five Challenges for the Collaborative Classroom and How to Solve Them An white paper sponsored by ELMO Five Challenges for the Collaborative Classroom and How to Solve Them CONTENTS 2 Why Create a Collaborative Classroom? 3 Key Challenges to Digital Collaboration 5 How Huddle

More information

Computer Organization I (Tietokoneen toiminta)

Computer Organization I (Tietokoneen toiminta) 581305-6 Computer Organization I (Tietokoneen toiminta) Teemu Kerola University of Helsinki Department of Computer Science Spring 2010 1 Computer Organization I Course area and goals Course learning methods

More information

Year 4 National Curriculum requirements

Year 4 National Curriculum requirements Year National Curriculum requirements Pupils should be taught to develop a range of personal strategies for learning new and irregular words* develop a range of personal strategies for spelling at the

More information

From Empire to Twenty-First Century Britain: Economic and Political Development of Great Britain in the 19th and 20th Centuries 5HD391

From Empire to Twenty-First Century Britain: Economic and Political Development of Great Britain in the 19th and 20th Centuries 5HD391 Provisional list of courses for Exchange students Fall semester 2017: University of Economics, Prague Courses stated below are offered by particular departments and faculties at the University of Economics,

More information

Test Administrator User Guide

Test Administrator User Guide Test Administrator User Guide Fall 2017 and Winter 2018 Published October 17, 2017 Prepared by the American Institutes for Research Descriptions of the operation of the Test Information Distribution Engine,

More information

In Workflow. Viewing: Last edit: 10/27/15 1:51 pm. Approval Path. Date Submi ed: 10/09/15 2:47 pm. 6. Coordinator Curriculum Management

In Workflow. Viewing: Last edit: 10/27/15 1:51 pm. Approval Path. Date Submi ed: 10/09/15 2:47 pm. 6. Coordinator Curriculum Management 1 of 5 11/19/2015 8:10 AM Date Submi ed: 10/09/15 2:47 pm Viewing: Last edit: 10/27/15 1:51 pm Changes proposed by: GODWINH In Workflow 1. BUSI Editor 2. BUSI Chair 3. BU Associate Dean 4. Biggio Center

More information

Quick Start Guide 7.0

Quick Start Guide 7.0 www.skillsoft.com Quick Start Guide 7.0 Copyright 2010 SkillSoft Corporation. All rights reserved SkillSoft Corporation 107 Northeastern Blvd. Nashua, NH 03062 603-324-3000 87-SkillSoft (877-545-5763)

More information

SYLLABUS- ACCOUNTING 5250: Advanced Auditing (SPRING 2017)

SYLLABUS- ACCOUNTING 5250: Advanced Auditing (SPRING 2017) (1) Course Information ACCT 5250: Advanced Auditing 3 semester hours of graduate credit (2) Instructor Information Richard T. Evans, MBA, CPA, CISA, ACDA (571) 338-3855 re7n@virginia.edu (3) Course Dates

More information

ACTIVITY: Comparing Combination Locks

ACTIVITY: Comparing Combination Locks 5.4 Compound Events outcomes of one or more events? ow can you find the number of possible ACIVIY: Comparing Combination Locks Work with a partner. You are buying a combination lock. You have three choices.

More information

Office of Planning and Budgets. Provost Market for Fiscal Year Resource Guide

Office of Planning and Budgets. Provost Market for Fiscal Year Resource Guide Office of Planning and Budgets Provost Market for Fiscal Year 2017-18 Resource Guide This resource guide will show users how to operate the Cognos Planning application used to collect Provost Market raise

More information

Experience College- and Career-Ready Assessment User Guide

Experience College- and Career-Ready Assessment User Guide Experience College- and Career-Ready Assessment User Guide 2014-2015 Introduction Welcome to Experience College- and Career-Ready Assessment, or Experience CCRA. Experience CCRA is a series of practice

More information

Your School and You. Guide for Administrators

Your School and You. Guide for Administrators Your School and You Guide for Administrators Table of Content SCHOOLSPEAK CONCEPTS AND BUILDING BLOCKS... 1 SchoolSpeak Building Blocks... 3 ACCOUNT... 4 ADMIN... 5 MANAGING SCHOOLSPEAK ACCOUNT ADMINISTRATORS...

More information

Using SAM Central With iread

Using SAM Central With iread Using SAM Central With iread January 1, 2016 For use with iread version 1.2 or later, SAM Central, and Student Achievement Manager version 2.4 or later PDF0868 (PDF) Houghton Mifflin Harcourt Publishing

More information

Phonological Processing for Urdu Text to Speech System

Phonological Processing for Urdu Text to Speech System Phonological Processing for Urdu Text to Speech System Sarmad Hussain Center for Research in Urdu Language Processing, National University of Computer and Emerging Sciences, B Block, Faisal Town, Lahore,

More information

The European Higher Education Area in 2012:

The European Higher Education Area in 2012: PRESS BRIEFING The European Higher Education Area in 2012: Bologna Process Implementation Report EURYDI CE CONTEXT The Bologna Process Implementation Report is the result of a joint effort by Eurostat,

More information

TeacherPlus Gradebook HTML5 Guide LEARN OUR SOFTWARE STEP BY STEP

TeacherPlus Gradebook HTML5 Guide LEARN OUR SOFTWARE STEP BY STEP TeacherPlus Gradebook HTML5 Guide LEARN OUR SOFTWARE STEP BY STEP Copyright 2017 Rediker Software. All rights reserved. Information in this document is subject to change without notice. The software described

More information

Moodle Student User Guide

Moodle Student User Guide Moodle Student User Guide Moodle Student User Guide... 1 Aims and Objectives... 2 Aim... 2 Student Guide Introduction... 2 Entering the Moodle from the website... 2 Entering the course... 3 In the course...

More information

Intel-powered Classmate PC. SMART Response* Training Foils. Version 2.0

Intel-powered Classmate PC. SMART Response* Training Foils. Version 2.0 Intel-powered Classmate PC Training Foils Version 2.0 1 Legal Information INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE,

More information

MASTERY OF PHONEMIC SYMBOLS AND STUDENT EXPERIENCES IN PRONUNCIATION TEACHING. Master s thesis Aino Saarelainen

MASTERY OF PHONEMIC SYMBOLS AND STUDENT EXPERIENCES IN PRONUNCIATION TEACHING. Master s thesis Aino Saarelainen MASTERY OF PHONEMIC SYMBOLS AND STUDENT EXPERIENCES IN PRONUNCIATION TEACHING Master s thesis Aino Saarelainen University of Jyväskylä Department of Languages English September 2016 JYVÄSKYLÄN YLIOPISTO

More information

CODE Multimedia Manual network version

CODE Multimedia Manual network version CODE Multimedia Manual network version Introduction With CODE you work independently for a great deal of time. The exercises that you do independently are often done by computer. With the computer programme

More information

Open Source Mobile Learning: Mobile Linux Applications By Lee Chao

Open Source Mobile Learning: Mobile Linux Applications By Lee Chao Open Source Mobile Learning: Mobile Linux Applications By Lee Chao If searching for the ebook by Lee Chao Open Source Mobile Learning: Mobile Linux Applications in pdf format, in that case you come on

More information

Student Information System. Parent Quick Start Guide

Student Information System. Parent Quick Start Guide Student Information System Parent Quick Start Guide Contents Purpose of this Guide 3 Getting Started Technical Requirements 3 Logging In 4 Dashboard Tools and Features 5 2 Quick Start Guide for Parents

More information

Mixed Accents: Scottish Children with English Parents

Mixed Accents: Scottish Children with English Parents Mixed Accents: Scottish Children with English Parents Sarah Thomas and James M Scobbie Clinical Audiology, Speech and Language Research Centre Queen Margaret University, Edinburgh, United Kingdom Abstract

More information

English Language A Level. Edexcel. A Handbook

English Language A Level. Edexcel. A Handbook English Language A Level Edexcel A Handbook Overview of the A Level Course Component One: Language Variation 60 marks 35% weighting Exam: 2 hours 15 mins Section A Individual Variation (30 marks) One compulsory

More information

Using a Native Language Reference Grammar as a Language Learning Tool

Using a Native Language Reference Grammar as a Language Learning Tool Using a Native Language Reference Grammar as a Language Learning Tool Stacey I. Oberly University of Arizona & American Indian Language Development Institute Introduction This article is a case study in

More information

MOODLE 2.0 GLOSSARY TUTORIALS

MOODLE 2.0 GLOSSARY TUTORIALS BEGINNING TUTORIALS SECTION 1 TUTORIAL OVERVIEW MOODLE 2.0 GLOSSARY TUTORIALS The glossary activity module enables participants to create and maintain a list of definitions, like a dictionary, or to collect

More information

Lip reading: Japanese vowel recognition by tracking temporal changes of lip shape

Lip reading: Japanese vowel recognition by tracking temporal changes of lip shape Lip reading: Japanese vowel recognition by tracking temporal changes of lip shape Koshi Odagiri 1, and Yoichi Muraoka 1 1 Graduate School of Fundamental/Computer Science and Engineering, Waseda University,

More information

Science Olympiad Competition Model This! Event Guidelines

Science Olympiad Competition Model This! Event Guidelines Science Olympiad Competition Model This! Event Guidelines These guidelines should assist event supervisors in preparing for and setting up the Model This! competition for Divisions B and C. Questions should

More information

Basic German: CD/Book Package (LL(R) Complete Basic Courses) By Living Language

Basic German: CD/Book Package (LL(R) Complete Basic Courses) By Living Language Basic German: CD/Book Package (LL(R) Complete Basic Courses) By Living Language If searching for the book by Living Language Basic German: CD/Book Package (LL(R) Complete Basic Courses) in pdf format,

More information

Planning a Webcast. Steps You Need to Master When

Planning a Webcast. Steps You Need to Master When 10 Steps You Need to Master When Planning a Webcast If you are new to the world of webcasts, it is easy to feel overwhelmed when you sit down to plan. If you become lost in all the details, you can easily

More information

Courses below are sorted by the column Field of study for your better orientation. The list is subject to change.

Courses below are sorted by the column Field of study for your better orientation. The list is subject to change. Provisional list of courses for Exchange students Spring semester 2017: University of Economics, Prague Courses stated below are offered by particular departments and faculties at the University of Economics,

More information

SECTION 12 E-Learning (CBT) Delivery Module

SECTION 12 E-Learning (CBT) Delivery Module SECTION 12 E-Learning (CBT) Delivery Module Linking a CBT package (file or URL) to an item of Set Training 2 Linking an active Redkite Question Master assessment 2 to the end of a CBT package Removing

More information

Web as Corpus. Corpus Linguistics. Web as Corpus 1 / 1. Corpus Linguistics. Web as Corpus. web.pl 3 / 1. Sketch Engine. Corpus Linguistics

Web as Corpus. Corpus Linguistics. Web as Corpus 1 / 1. Corpus Linguistics. Web as Corpus. web.pl 3 / 1. Sketch Engine. Corpus Linguistics (L615) Markus Dickinson Department of Linguistics, Indiana University Spring 2013 The web provides new opportunities for gathering data Viable source of disposable corpora, built ad hoc for specific purposes

More information

Books Effective Literacy Y5-8 Learning Through Talk Y4-8 Switch onto Spelling Spelling Under Scrutiny

Books Effective Literacy Y5-8 Learning Through Talk Y4-8 Switch onto Spelling Spelling Under Scrutiny By the End of Year 8 All Essential words lists 1-7 290 words Commonly Misspelt Words-55 working out more complex, irregular, and/or ambiguous words by using strategies such as inferring the unknown from

More information

Spring 2015 Online Testing. Program Information and Registration and Technology Survey (RTS) Training Session

Spring 2015 Online Testing. Program Information and Registration and Technology Survey (RTS) Training Session Spring 2015 Online Testing Program Information and Registration and Technology Survey (RTS) Training Session Webinar Training Sessions: Calls will be operator assisted. Submit questions through the chat

More information

Rental Property Management: An Android Application

Rental Property Management: An Android Application Rental Property Management: An Android Application GRADUATE PROJECT Submitted to the Faculty of The School of Engineering & Computing Sciences Texas A&M University-Corpus Christi Corpus Christi, TX In

More information

SkillPort Quick Start Guide 7.0

SkillPort Quick Start Guide 7.0 SkillPort Quick Start Guide 7.0 www.skillsoft.com Copyright 2009 SkillSoft Corporation. All rights reserved SkillSoft Corporation 107 Northeastern Blvd. Nashua, NH 03062 603-324-3000 87-SkillSoft (877-545-5763)

More information

RETURNING TEACHER REQUIRED TRAINING MODULE YE TRANSCRIPT

RETURNING TEACHER REQUIRED TRAINING MODULE YE TRANSCRIPT RETURNING TEACHER REQUIRED TRAINING MODULE YE Slide 1. The Dynamic Learning Maps Alternate Assessments are designed to measure what students with significant cognitive disabilities know and can do in relation

More information

The influence of orthographic transparency on word recognition. by dyslexic and normal readers

The influence of orthographic transparency on word recognition. by dyslexic and normal readers The influence of orthographic transparency on word recognition by dyslexic and normal readers Renske Berckmoes, 3932338 Master thesis Taal, Mens & Maatschappij (Taalwetenschappen) First supervisor: dr.

More information

Busuu The Mobile App. Review by Musa Nushi & Homa Jenabzadeh, Introduction. 30 TESL Reporter 49 (2), pp

Busuu The Mobile App. Review by Musa Nushi & Homa Jenabzadeh, Introduction. 30 TESL Reporter 49 (2), pp 30 TESL Reporter 49 (2), pp. 30 38 Busuu The Mobile App Review by Musa Nushi & Homa Jenabzadeh, Shahid Beheshti University, Tehran, Iran Introduction Technological innovations are changing the second language

More information

Star Math Pretest Instructions

Star Math Pretest Instructions Star Math Pretest Instructions Renaissance Learning P.O. Box 8036 Wisconsin Rapids, WI 54495-8036 (800) 338-4204 www.renaissance.com All logos, designs, and brand names for Renaissance products and services,

More information

Turkish Vocabulary Developer I / Vokabeltrainer I (Turkish Edition) By Katja Zehrfeld;Ali Akpinar

Turkish Vocabulary Developer I / Vokabeltrainer I (Turkish Edition) By Katja Zehrfeld;Ali Akpinar Turkish Vocabulary Developer I / Vokabeltrainer I (Turkish Edition) By Katja Zehrfeld;Ali Akpinar If you are looking for the ebook by Katja Zehrfeld;Ali Akpinar Turkish Vocabulary Developer I / Vokabeltrainer

More information

Training Catalogue for ACOs Global Learning Services V1.2. amadeus.com

Training Catalogue for ACOs Global Learning Services V1.2. amadeus.com Training Catalogue for ACOs Global Learning Services V1.2 amadeus.com Global Learning Services Training Catalogue for ACOs V1.2 This catalogue lists the training courses offered to ACOs by Global Learning

More information

CHANCERY SMS 5.0 STUDENT SCHEDULING

CHANCERY SMS 5.0 STUDENT SCHEDULING CHANCERY SMS 5.0 STUDENT SCHEDULING PARTICIPANT WORKBOOK VERSION: 06/04 CSL - 12148 Student Scheduling Chancery SMS 5.0 : Student Scheduling... 1 Course Objectives... 1 Course Agenda... 1 Topic 1: Overview

More information

The Moodle and joule 2 Teacher Toolkit

The Moodle and joule 2 Teacher Toolkit The Moodle and joule 2 Teacher Toolkit Moodlerooms Learning Solutions The design and development of Moodle and joule continues to be guided by social constructionist pedagogy. This refers to the idea that

More information

French Dictionary: 1000 French Words Illustrated By Evelyn Goldsmith

French Dictionary: 1000 French Words Illustrated By Evelyn Goldsmith French Dictionary: 1000 French Words Illustrated By Evelyn Goldsmith If searching for the ebook French Dictionary: 1000 French Words Illustrated by Evelyn Goldsmith in pdf format, then you've come to correct

More information

NCU IISR English-Korean and English-Chinese Named Entity Transliteration Using Different Grapheme Segmentation Approaches

NCU IISR English-Korean and English-Chinese Named Entity Transliteration Using Different Grapheme Segmentation Approaches NCU IISR English-Korean and English-Chinese Named Entity Transliteration Using Different Grapheme Segmentation Approaches Yu-Chun Wang Chun-Kai Wu Richard Tzong-Han Tsai Department of Computer Science

More information

READ 180 Next Generation Software Manual

READ 180 Next Generation Software Manual READ 180 Next Generation Software Manual including ereads For use with READ 180 Next Generation version 2.3 and Scholastic Achievement Manager version 2.3 or higher Copyright 2014 by Scholastic Inc. All

More information

ACCOUNTING FOR MANAGERS BU-5190-OL Syllabus

ACCOUNTING FOR MANAGERS BU-5190-OL Syllabus MASTER IN BUSINESS ADMINISTRATION ACCOUNTING FOR MANAGERS BU-5190-OL Syllabus Fall 2011 P LYMOUTH S TATE U NIVERSITY, C OLLEGE OF B USINESS A DMINISTRATION 1 Page 2 PLYMOUTH STATE UNIVERSITY College of

More information

Student User s Guide to the Project Integration Management Simulation. Based on the PMBOK Guide - 5 th edition

Student User s Guide to the Project Integration Management Simulation. Based on the PMBOK Guide - 5 th edition Student User s Guide to the Project Integration Management Simulation Based on the PMBOK Guide - 5 th edition TABLE OF CONTENTS Goal... 2 Accessing the Simulation... 2 Creating Your Double Masters User

More information

POWERTEACHER GRADEBOOK

POWERTEACHER GRADEBOOK POWERTEACHER GRADEBOOK FOR THE SECONDARY CLASSROOM TEACHER In Prince William County Public Schools (PWCS), student information is stored electronically in the PowerSchool SMS program. Enrolling students

More information

German Vocabulary (Quickstudy: Academic) By Inc. BarCharts

German Vocabulary (Quickstudy: Academic) By Inc. BarCharts German Vocabulary (Quickstudy: Academic) By Inc. BarCharts If searched for a ebook German Vocabulary (Quickstudy: Academic) by Inc. BarCharts in pdf form, in that case you come on to the right site. We

More information

Getting Started with Deliberate Practice

Getting Started with Deliberate Practice Getting Started with Deliberate Practice Most of the implementation guides so far in Learning on Steroids have focused on conceptual skills. Things like being able to form mental images, remembering facts

More information

WiggleWorks Software Manual PDF0049 (PDF) Houghton Mifflin Harcourt Publishing Company

WiggleWorks Software Manual PDF0049 (PDF) Houghton Mifflin Harcourt Publishing Company WiggleWorks Software Manual PDF0049 (PDF) Houghton Mifflin Harcourt Publishing Company Table of Contents Welcome to WiggleWorks... 3 Program Materials... 3 WiggleWorks Teacher Software... 4 Logging In...

More information

Berlitz Swedish-English Dictionary (Berlitz Bilingual Dictionaries) By Berlitz Guides

Berlitz Swedish-English Dictionary (Berlitz Bilingual Dictionaries) By Berlitz Guides Berlitz Swedish-English Dictionary (Berlitz Bilingual Dictionaries) By Berlitz Guides If searching for a ebook by Berlitz Guides Berlitz Swedish-English Dictionary (Berlitz Bilingual Dictionaries) in pdf

More information

Contrastiveness and diachronic variation in Chinese nasal codas. Tsz-Him Tsui The Ohio State University

Contrastiveness and diachronic variation in Chinese nasal codas. Tsz-Him Tsui The Ohio State University Contrastiveness and diachronic variation in Chinese nasal codas Tsz-Him Tsui The Ohio State University Abstract: Among the nasal codas across Chinese languages, [-m] underwent sound changes more often

More information

Student Handbook. Supporting Today s Students with the Technology of Tomorrow

Student Handbook. Supporting Today s Students with the Technology of Tomorrow Student Handbook Supporting Today s Students with the Technology of Tomorrow Page 2 Student Handbook LOGAN ACADEMY OF VIRTUAL ACADEMICS Page 3 Table of Contents About LAVA 4 Enrollment 5 Graduation Requirements

More information

English-German Medical Dictionary And Phrasebook By A.H. Zemback

English-German Medical Dictionary And Phrasebook By A.H. Zemback English-German Medical Dictionary And Phrasebook By A.H. Zemback If you are searching for a ebook English-German Medical Dictionary and Phrasebook by A.H. Zemback in pdf form, then you've come to loyal

More information

University of Waterloo School of Accountancy. AFM 102: Introductory Management Accounting. Fall Term 2004: Section 4

University of Waterloo School of Accountancy. AFM 102: Introductory Management Accounting. Fall Term 2004: Section 4 University of Waterloo School of Accountancy AFM 102: Introductory Management Accounting Fall Term 2004: Section 4 Instructor: Alan Webb Office: HH 289A / BFG 2120 B (after October 1) Phone: 888-4567 ext.

More information

DO NOT DISCARD: TEACHER MANUAL

DO NOT DISCARD: TEACHER MANUAL DO NOT DISCARD: TEACHER MANUAL Adoption Registration Guide for Teachers & Students FOR ONLINE ACCESS TO: Mastering MyLab Instructor Resource Center This manual supports only those programs listed online

More information

School Year 2017/18. DDS MySped Application SPECIAL EDUCATION. Training Guide

School Year 2017/18. DDS MySped Application SPECIAL EDUCATION. Training Guide SPECIAL EDUCATION School Year 2017/18 DDS MySped Application SPECIAL EDUCATION Training Guide Revision: July, 2017 Table of Contents DDS Student Application Key Concepts and Understanding... 3 Access to

More information

Introduction to Mobile Learning Systems and Usability Factors

Introduction to Mobile Learning Systems and Usability Factors Introduction to Mobile Learning Systems and Usability Factors K.B.Lee Computer Science University of Northern Virginia Annandale, VA Kwang.lee@unva.edu Abstract - Number of people using mobile phones has

More information

Guidelines and additional provisions for the PhD Programmes at VID Specialized University

Guidelines and additional provisions for the PhD Programmes at VID Specialized University Guidelines and additional provisions for the PhD Programmes at VID Specialized University PART 1. INTRODUCTORY PROVISIONS These guidelines are additional provisions to the Regulation of 11 December 2015

More information

First Grade Curriculum Highlights: In alignment with the Common Core Standards

First Grade Curriculum Highlights: In alignment with the Common Core Standards First Grade Curriculum Highlights: In alignment with the Common Core Standards ENGLISH LANGUAGE ARTS Foundational Skills Print Concepts Demonstrate understanding of the organization and basic features

More information

Adult Degree Program. MyWPclasses (Moodle) Guide

Adult Degree Program. MyWPclasses (Moodle) Guide Adult Degree Program MyWPclasses (Moodle) Guide Table of Contents Section I: What is Moodle?... 3 The Basics... 3 The Moodle Dashboard... 4 Navigation Drawer... 5 Course Administration... 5 Activity and

More information

L131 STATEMENT Of VOTES, PRESIOENTIAL P8I«ARY ELECTION TyESOAY* MARCH 17# 1992 PA6 PRESIDENT OF THE UNITED STATES OF AMERICA DEHOCRATIC PART L A

L131 STATEMENT Of VOTES, PRESIOENTIAL P8I«ARY ELECTION TyESOAY* MARCH 17# 1992 PA6 PRESIDENT OF THE UNITED STATES OF AMERICA DEHOCRATIC PART L A 1 M Of VO, PO P«Y O yoy M # 92 P6 P OF OF M O P B u y 1 «Y Y M P 6 OF OWP P 1 1 6 4? 96 1--5 1#9? 2 3,47 3 1.49 3 659 1 74 1,652 2,2 2,7 1 5,7 4 3 4 5 64 3 3 3 3 6 4 62 4 6 9 O 72 5 65 4 1,3 5 1, Y Y Y

More information

Virtually Anywhere Episodes 1 and 2. Teacher s Notes

Virtually Anywhere Episodes 1 and 2. Teacher s Notes Virtually Anywhere Episodes 1 and 2 Geeta and Paul are final year Archaeology students who don t get along very well. They are working together on their final piece of coursework, and while arguing over

More information

2 User Guide of Blackboard Mobile Learn for CityU Students (Android) How to download / install Bb Mobile Learn? Downloaded from Google Play Store

2 User Guide of Blackboard Mobile Learn for CityU Students (Android) How to download / install Bb Mobile Learn? Downloaded from Google Play Store 2 User Guide of Blackboard Mobile Learn for CityU Students (Android) Part 1 Part 2 Part 3 Part 4 How to download / install Bb Mobile Learn? Downloaded from Google Play Store How to access e Portal via

More information

The IDN Variant Issues Project: A Study of Issues Related to the Delegation of IDN Variant TLDs. 20 April 2011

The IDN Variant Issues Project: A Study of Issues Related to the Delegation of IDN Variant TLDs. 20 April 2011 The IDN Variant Issues Project: A Study of Issues Related to the Delegation of IDN Variant TLDs 20 April 2011 Project Proposal updated based on comments received during the Public Comment period held from

More information

Contents. Foreword... 5

Contents. Foreword... 5 Contents Foreword... 5 Chapter 1: Addition Within 0-10 Introduction... 6 Two Groups and a Total... 10 Learn Symbols + and =... 13 Addition Practice... 15 Which is More?... 17 Missing Items... 19 Sums with

More information

Education & Training Plan Civil Litigation Specialist Certificate Program with Externship

Education & Training Plan Civil Litigation Specialist Certificate Program with Externship C.15.33 (Created 07-17-2017) AUBURN OHICE OF P ROFESSIONAL AND CONTINUING EDUCATION Office of Professional & Continuing Education 301 OD Smith Hall Auburn, AL 36849 http://www.auburn.edu/mycaa Contact:

More information