Text analysis and speech concepts: AI-901 study notes and practice questions
What to know about Text analysis and speech concepts for the AI-901 exam, from the Identify AI concepts and capabilities domain (42% of the exam guide), then 3 free questions to test it. Part of the AI-901 study guide.
These two services are easy to mix up with each other and within themselves. The reliable rule is to start from the input: audio goes to Azure Speech, text goes to Azure Language.
Text analysis with Azure Language
Feature
What it returns
Sentiment analysis
Positive, negative, neutral or mixed; opinion mining ties sentiment to specific aspects, such as “the food” versus “the service”
Key phrase extraction
The main concepts as a list
Entity detection (NER)
People, places, organizations, dates and other categories; entity linking adds links to a knowledge source
PII detection
Finds personal data and can redact it
Language detection
Which language a text is written in
Summarization
A shorter version, extractive (picks key sentences) or abstractive (writes new ones)
Translation is a separate tool, Azure Translator. Microsoft now recommends PII detection, language detection, named entity recognition and text analytics for health for new development, and labels several older features, such as sentiment analysis and key phrase extraction, as legacy. They are still supported, and the exam skills still treat them as concepts.
Speech with Azure Speech
Speech to text (recognition) turns audio into text. It works in real time, on files with fast transcription, or in bulk with batch transcription.
Text to speech (synthesis) turns text into audio with neural voices. SSML is markup that adjusts pitch, rate, volume and pronunciation.
Speech translation translates spoken language, and language identification works out which language is being spoken.
Voice Live is a low-latency interface for speech conversations with an agent. It handles recognition, turn-taking, model interaction and synthesis.
Common traps
Using Language for a recording. Transcribe it with Speech first.
Sentiment versus key phrases. Sentiment is about opinion. Key phrases are about topics.
Entities versus PII. PII is a focused set of sensitive categories, built for redaction.
Recognition versus synthesis. Recognition is audio to text. Synthesis is text to audio.
A hotel group has 10,000 guest reviews from its booking site, and it wants to know which topics guests mention most, such as the pool, breakfast or parking.
Nobody on the team has time to read every review, so the output should be a short list of key terms for each one.
Which text analysis capability should the team use?
Choose one answer.
AA. Language detection, which identifies the language that each review is written in.
BB. Key phrase extraction, which returns the main concepts in each review as a short list of terms.
CC. Entity recognition, which finds named people, places and organizations mentioned in each review.
DD. Speech-to-text, which transcribes audio recordings of guests describing their stay.
Show the answer and explanation
Answer: B
A. Wrong: Language detection reports which language a text is written in. Knowing the language of each review does not tell the team which topics guests mention.
B. Right: Correct. Key phrase extraction pulls out the main concepts from text, such as pool, breakfast or parking, as a list. That gives the team a quick view of topics without reading every review. Learn more: What is Azure Language? (opens in a new tab)
C. Wrong: Entity recognition finds named things such as people, places and organizations. Topics like the pool or breakfast are not named entities, so this would miss what the team wants.
D. Wrong: Speech-to-text turns audio into text, but the reviews are already written. It does not identify the topics that guests mention.
Explanation
Key phrase extraction returns the main concepts in a text as a list of terms, which suits identifying what guests mention most. Language detection and speech-to-text do not analyze topics in written reviews. Entity recognition finds named people, places and organizations, which these topics are not.
A resort runs guided garden tours in which the guide speaks English into a microphone.
Many guests speak only Spanish or Japanese, and they want to follow the tour live on their phones as text or audio in their own language. There is no written script.
Which capability should the resort use?
Choose one answer.
AA. Speech-to-text, which writes down the guide's English words as an English transcript.
BB. Speech translation, which turns the guide's spoken English into another language as text or speech.
CC. Text translation with Azure Translator, which converts a written tour script into other languages.
DD. Text-to-speech with neural voices, which reads a written script aloud in a natural voice.
Show the answer and explanation
Answer: B
A. Wrong: Speech-to-text turns the guide's speech into text, but in the same language that was spoken. Guests who speak only Spanish or Japanese still could not follow the tour.
B. Right: Correct. Speech translation recognizes spoken audio and returns it in another language, as text or as synthesized speech. It works live on the guide's voice, so no written script is needed. Learn more: What is the Speech service? (opens in a new tab)
C. Wrong: Azure Translator translates text that already exists, and the guide has no written script. The resort would first need to transcribe the speech, so this alone does not meet the live need.
D. Wrong: Text-to-speech turns written text into audio in the language of that text. It does not translate the guide's spoken words, and there is no script for it to read.
Explanation
The input is live English speech and the output must be another language, which is speech translation in Azure Speech. Speech-to-text keeps the original language, Azure Translator needs existing text, and text-to-speech only voices text. The lack of a written script is what rules out the text-based options.
A consumer electronics chain records its support calls as audio files and wants a written transcript of each call. Analysts will read the transcripts, so customers' card numbers and phone numbers must be removed before anyone sees them.
All calls are in English, and analysts only read the transcripts.
Which two capabilities should the chain use? (Choose two.)
Choose two answers.
AA. Speech-to-text, to convert each recorded call into a written transcript.
BB. Text-to-speech, to generate spoken audio from the transcripts so analysts can listen to them.
CC. PII detection with redaction, to remove card numbers and phone numbers from the transcript text.
DD. Key phrase extraction, to list the main topics of each call for the monthly service report.
EE. Speech translation, to convert each call into another language for overseas analysts.
Show the answer and explanation
Answers: A, C
A. Right: Correct. Speech-to-text turns the recorded audio into written text, which is the first step the chain needs. The redaction step can only work once the call exists as text. Learn more: What is the Speech service? (opens in a new tab)
B. Wrong: Text-to-speech works in the reverse direction, creating audio from text. Analysts do not need to listen, so this adds nothing and does not remove any personal details.
C. Right: Correct. Personally identifiable information detection finds sensitive items such as card and phone numbers in text, and redaction removes them. Applying it to the transcripts protects customers before analysts read them. Learn more: What is Azure Language? (opens in a new tab)
D. Wrong: Key phrase extraction lists main topics, but it does not remove personal numbers from the transcript. The privacy requirement would still be unmet.
E. Wrong: All calls are in English and the stem does not ask for translation. Translating calls would not remove card numbers or phone numbers, so it misses both requirements.
Explanation
The chain needs written transcripts, which is speech-to-text, and it needs personal numbers removed from text before analysts see it, which is PII detection with redaction. Text-to-speech, key phrase extraction and speech translation each miss one of those requirements. Redaction works on text, so transcription has to happen first.
Want more on Text analysis and speech concepts? The 5 full-length practice sets have 15 more Text analysis and speech concepts questions, 225 in all, none of them in the free exam. One payment of $9.99 $6.99, no subscription. Get the practice sets →