Transcribe, Polly, Translate and Comprehend
Amazon Transcribe for speech to text, Amazon Polly for text to speech with lexicons and SSML, Amazon Translate, and Amazon Comprehend and Comprehend Medical for natural language processing.
Amazon Transcribe
Amazon Transcribe automatically converts speech to text.
- Uses a deep learning process called automatic speech recognition (ASR) to convert speech to text quickly and accurately.
- Batch (audio files in S3) or streaming (real time).
- Automatically removes personally identifiable information (PII) using redaction.
- Supports automatic language identification for multi-lingual audio.
- Also: custom vocabularies, identifying different speakers, Call Analytics for contact centers, and Transcribe Medical.
Use cases:
- transcribe customer service calls;
- automate closed captioning and subtitling;
- generate metadata for media assets to create a fully searchable archive.
Amazon Polly
Amazon Polly turns text into lifelike speech using deep learning, to create applications that talk. It offers several voice engines (standard, neural, long-form, generative).
Lexicons and SSML
- Pronunciation lexicons customise how words are pronounced:
- stylized words:
St3ph4ne→ "Stephane"; - acronyms:
AWS→ "Amazon Web Services".
- stylized words:
- Upload the lexicons and use them in the
SynthesizeSpeechoperation. - SSML (Speech Synthesis Markup Language) marks up a document for more control:
- emphasizing specific words or phrases;
- using phonetic pronunciation;
- including breathing sounds and whispering;
- using the Newscaster speaking style.
<speak>Hello, I am <emphasis>very</emphasis> happy to meet you.
<amazon:effect name="whispered">This part is a secret.</amazon:effect></speak>Amazon Translate
Amazon Translate gives natural and accurate language translation.
- Localize content, such as websites and applications, for international users.
- Translate large volumes of text efficiently, in real time or in batches.
- Custom terminology keeps brand names and technical terms translated a set way.
Amazon Comprehend
Amazon Comprehend is for natural language processing (NLP): fully managed and serverless.
It uses machine learning to find insights and relationships in text:
- the language of the text;
- key phrases, places, people, brands or events (entities);
- how positive or negative the text is (sentiment);
- syntax, with tokenization and parts of speech;
- it automatically organizes a collection of text files by topic (topic modeling);
- it detects PII, and supports training custom classifiers and entity recognisers.
Sample use cases:
- analyse customer interactions (emails) to find what leads to a positive or negative experience;
- create and group articles by the topics Comprehend uncovers.
Amazon Comprehend Medical
Amazon Comprehend Medical detects and returns useful information in unstructured clinical text:
- physician's notes;
- discharge summaries;
- test results;
- case notes.
It uses NLP to detect Protected Health Information (PHI) with the DetectPHI API, and links medical terms to standard codes. Store the documents in S3, analyse real-time data with Data Firehose, or use Transcribe to turn patient narratives into text that Comprehend Medical analyses.
Real-world examples
- A broadcaster adds live subtitles to news streams with Transcribe streaming, then translates them into three languages with Translate.
- An e-learning site narrates every article with Polly, using a lexicon so its product names are pronounced correctly.
- A hotel chain runs Comprehend over thousands of reviews a day to track sentiment per hotel.
Exam tips
- "Speech to text", "subtitles", "transcribe calls" → Transcribe. "Remove PII from transcripts" → Transcribe redaction.
- "Text to speech" → Polly. "Customise pronunciation" → lexicons. "Whisper, emphasis, breathing" → SSML.
- "Translate a website or app" → Translate.
- "Sentiment analysis", "extract entities or key phrases" → Comprehend.
- "Medical notes", "detect PHI" → Comprehend Medical.
Common traps
- "Polly converts speech to text." Polly speaks (text to speech); Transcribe listens (speech to text).
- "Comprehend for clinical PHI." Use Comprehend Medical for clinical text.
Hands-on lab: make Polly whisper
Goal: generate speech from SSML and hear the difference.
Costs money
Polly costs from $4 per million characters (standard voices) to more for neural, long-form and generative voices, so a few sentences cost far less than a cent. Any Region with Polly works.
Plain text
Open Polly → Text-to-Speech. Choose a neural English voice, type AWS makes this easy, and click Listen.
SSML
Switch on SSML and enter:
<speak>Amazon Web Services makes this <emphasis>easy</emphasis>.
<amazon:effect name="whispered">Even at night.</amazon:effect></speak>Choose a standard voice (whispering is supported on standard voices) and click Listen.
Expected result: the second version stresses "easy" and whispers the last sentence.
Clean up: nothing to delete.
AWS documentation
Rekognition and Textract
Amazon Rekognition for finding objects, people, text and unsafe content in images and video, content moderation with Amazon A2I, and Amazon Textract for extracting text and data from documents.
Lex, Connect and Kendra
Amazon Lex for chatbots and voice bots, Amazon Connect for cloud contact centers and how they work together, and Amazon Kendra for ML-powered document search.