Lesson 21 of 26 · see all lessons
Start here: the exam, Python basics and responsible AI (skill area 1, 40-45%)
AI models: how they work, choosing and deploying (skill area 1)
AI workloads: text, speech, vision and extraction (skill area 1)
Generative AI apps and agents in Foundry (skill area 2, 55-60%)
Text, speech, vision and extraction apps in Foundry (skill area 2)
- 17. Building a text analysis app
- 18. Building speech apps: spoken prompts and Azure Speech
- 19. Building vision apps: images in prompts and generated images
- 20. Extracting information with Content Understanding: documents and forms
- 21. Content Understanding for images, audio and video, and a small extraction app
Final review and four mock exams
19 min
Content Understanding for images, audio and video, and a small extraction app
Extract information from images, audio and video, then read a small Python app that calls Content Understanding.
By the end of this lesson you can
- Describe what Content Understanding extracts from images, audio and video
- Choose an analyzer for each modality
- Read a Python app that analyzes a call recording and reads fields and transcript
From earlier lessons · 1 of 2
A field must hold one value from the list "tour", "cruise" or "other". Which field method fits?
Pick one answer.
From earlier lessons · 2 of 2
In the Content Understanding SDK, what does poller.result() do after begin_analyze?
Pick one answer.
The Fernhill Travel helpline recorded 400 calls last week. The manager wants to know why people called, without anyone listening to all of them. Marketing also has 50 tour videos with no descriptions, and guides keep sending photos of hotel signs. The same tool that read the booking forms can handle all three.
What comes out of each modality
Exam depth: know it cold.
| Modality | Content extraction | Typical fields |
|---|---|---|
| Image | No OCR or layout; prebuilt-imageSearch adds a one-paragraph description. | Chart type, defects seen, products on a shelf. |
| Audio | A transcript in WebVTT format, split by speaker. | Summary, sentiment, call reason, people mentioned. |
| Video | Transcript, key frames, shots and segments with descriptions. | Scene category, brands seen, topic per segment. |
Audio and video fields use generate or classify. Extract works only for documents. If an image is mostly text, such as a hotel sign or a receipt photo, use a document analyzer instead. Image analyzers aren't built for text.
Audio: transcripts, speakers and call fields
Exam depth: know it cold.
Audio analysis starts by transcribing the recording into WebVTT text with timestamps. Then:
- Diarization splits the transcript by speaker.
- Speaker role detection labels the agent and the customer in contact-centre calls.
- Language handling: set
locales, or leave it on auto for multilingual transcription. - Field extraction adds your fields: a summary, the sentiment, the reason for the call.
Prebuilt options: prebuilt-audioSearch gives a transcript and a one-paragraph summary. prebuilt-callCenter pulls topics and sentiment from call recordings.
A support team needs to know which parts of each recorded call the agent said and which the customer said. Which Content Understanding feature provides this?
Pick one answer.
Video: segments, shots and key frames
Exam depth: know it cold.
Video analysis runs in two passes.
- Content extraction: a transcript of the speech, key frames (still images that represent each shot) and shot detection (where the camera cuts).
- Field extraction and segmentation: a generative model describes each segment, a logical chunk of the video, and fills your custom fields for it.
prebuilt-videoSearch splits a video into segments by topic or scene and returns, per segment, a description, transcript and key frames as Markdown. Limits to know: about one frame per second is sampled, frames are resized to 512 by 512 pixels, and music and sound effects aren't transcribed.
Marketing wants each tour video split into chapters, with a short description of what happens in each, ready for a search index. Which analyzer should you start with?
Pick one answer.
Images: descriptions and custom fields
Exam depth: recognize it.
prebuilt-imageSearch returns a one-paragraph description of an image for search. For your own fields, build a custom analyzer on prebuilt-image. Examples: the chart type of a sales chart, scratches on a product, or which items are on a shelf.
Decision rule: photo of a scene or object, image analyzer. Photo that is mostly text, such as a sign, receipt or form, document analyzer.
Read the code: define a call analyzer
from azure.ai.contentunderstanding.models import (ContentAnalyzer, ContentAnalyzerConfig, ContentFieldSchema,ContentFieldDefinition, ContentFieldType, GenerationMethod,)call_schema = ContentFieldSchema(name="helpline_call_schema",fields={"Summary": ContentFieldDefinition(type=ContentFieldType.STRING, method=GenerationMethod.GENERATE,description="Two-sentence summary of the call"),"CallReason": ContentFieldDefinition(type=ContentFieldType.STRING, method=GenerationMethod.CLASSIFY,description="Main reason the customer called",enum=["new booking", "change", "refund", "complaint", "other"]),},)analyzer = ContentAnalyzer(base_analyzer_id="prebuilt-audio",description="Fernhill Travel helpline calls",config=ContentAnalyzerConfig(locales=["en-US"], return_details=True),field_schema=call_schema,models={"completion": "gpt-5.2"},)client.begin_create_analyzer(analyzer_id="fernhill_calls", resource=analyzer).result()
Exam depth: know it cold.
- Lines 5-16 define the field schema.
Summaryuses generate;CallReasonuses classify with five allowed values. - Line 18 builds on
prebuilt-audio, the base analyzer for audio. - Line 20 sets the locale to English (US) and asks for details, such as timestamps.
- Line 22 names the model the analyzer uses. Audio custom analyzers need a completion model.
- Line 24 creates the analyzer and waits until it exists.
No field uses extract, because extract works only on documents.
Read the code: analyze a call and read the results
import osfrom azure.ai.contentunderstanding import ContentUnderstandingClientfrom azure.ai.contentunderstanding.models import AnalysisInput, AudioVisualContentfrom azure.core.credentials import AzureKeyCredentialclient = ContentUnderstandingClient(endpoint=os.environ["CONTENTUNDERSTANDING_ENDPOINT"],credential=AzureKeyCredential(os.environ["CONTENTUNDERSTANDING_KEY"]),)call_url = os.environ["CALL_RECORDING_URL"] # a public or SAS link to the MP3poller = client.begin_analyze(analyzer_id="fernhill_calls",inputs=[AnalysisInput(url=call_url)],)result = poller.result()call: AudioVisualContent = result.contents[0]print("Reason:", call.fields.get("CallReason").value)print("Summary:", call.fields.get("Summary").value)for phrase in call.transcript_phrases[:3]:print(f"[{phrase.speaker}] {phrase.start_time_ms} ms: {phrase.text}")
Exam depth: know it cold.
- Lines 6-9 create the client from the endpoint and key in environment variables.
- Line 10 reads the recording's URL. It must be reachable by the service, such as a storage link with a shared access signature (SAS).
- Lines 12-15 start the analysis with
begin_analyze, the analyzer ID and anAnalysisInput. This call starts the job. - Line 16 waits for it with
poller.result(). - Line 18 takes the first content item. Audio and video results are
AudioVisualContent. - Lines 19-20 read each field's
.value. - Lines 21-22 print the first transcript phrases with speaker and start time.
For a local file, call begin_analyze_binary with the file's bytes instead.
Choosing an analyzer
Exam depth: know it cold.
| Need | Analyzer |
|---|---|
| Transcript and summary of recordings, no setup. | prebuilt-audioSearch. |
| Topics and sentiment from contact-centre calls. | prebuilt-callCenter. |
| Your own call fields, such as call reason. | Custom on prebuilt-audio. |
| Video chapters with descriptions for search. | prebuilt-videoSearch. |
| Brand or category per video segment. | Custom on prebuilt-video. |
| A description of a photo for search. | prebuilt-imageSearch. |
| Your own fields from photos. | Custom on prebuilt-image. |
Decision rule: match the modality first, then prebuilt if it already returns what you need, custom if you need your own fields.
Match
Match each Fernhill Travel need to an analyzer.
Pick an item on the left, then its match on the right.
Exam-style practice
Your app analyzes a tour video with prebuilt-videoSearch and prints result.contents[0].markdown. Marketing says only the first part of the video is described. What should you change?
Pick one answer.
For each statement, select Yes if it is true. Statement: a custom audio analyzer can use the extract method to copy the customer's booking number exactly as spoken.
Pick one answer.
A hotel partner wants each room photo checked for visible damage, with one of "none", "minor" or "major" returned. What should you build?
Pick one answer.
Worth keeping
- Audio: transcript by speaker, roles, then generated or classified fields.
- Video: transcript, key frames and shots, then descriptions and fields per segment.
- Images: descriptions or your own fields; text-heavy photos go to a document analyzer.
- App pattern: client, begin_analyze with AnalysisInput, poller.result(), read fields and transcript.
On the job
Run a prebuilt analyzer on ten real files first and read the output before you design a schema. Keep classify lists short and clearly different, such as refund versus change. For calls, store the transcript next to the fields, so a manager can check a surprising label in seconds.
You can now build every app on the AI-901 outline: chat, agents, text, speech, vision and extraction. One lesson remains before the mock exams. It puts every decision and code pattern on one page and gives you a plan for exam day.
Leaderboard
Loading…
50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.
Embed this practice on your site
Free for classrooms, blogs and study groups. Paste this into any page that accepts HTML.
Report a copyright problem with this lesson
Sources for this lesson (10)
Each fact in the lesson is marked with the number of the page it comes from.
- [2]Microsoft Learn: Study guide for Exam AI-901: Microsoft Azure AI Fundamentals
- [60]Microsoft Learn: What is Azure Content Understanding in Foundry Tools?
- [92]Microsoft Learn: Azure Content Understanding in Foundry Tools image overview
- [93]Microsoft Learn: Azure Content Understanding in Foundry Tools audio overview
- [94]Microsoft Learn: Azure Content Understanding in Foundry Tools video overview
- [95]Microsoft Learn: Azure Content Understanding in Foundry Tools prebuilt analyzers
- [122]Microsoft Learn: Azure Content Understanding in Foundry Tools - What is an analyzer? Configuration and reference
- [123]Microsoft Learn: Azure AI Content Understanding client library for Python
- [124]Microsoft Learn: Quickstart: Azure Content Understanding in Foundry Tools
- [125]Microsoft Learn: Create a custom analyzer with Azure Content Understanding in Foundry Tools