Lesson 21 of 26 · see all lessons
  1. Start here: the exam, Python basics and responsible AI (skill area 1, 40-45%)

    1. 1. Start here: the AI-901 exam, the plan and what you already know
    2. 2. The Python and Azure basics AI-901 expects
    3. 3. Responsible AI: the six principles in practice
  2. AI models: how they work, choosing and deploying (skill area 1)

    1. 4. How generative AI models work
    2. 5. Choosing the right AI model for the job
    3. 6. Deploying a model: deployment options and configuration parameters
  3. AI workloads: text, speech, vision and extraction (skill area 1)

    1. 7. Common AI workloads: from chat and agents to vision and extraction
    2. 8. Text analysis: key phrases, entities, sentiment and summaries
    3. 9. Speech: recognition and synthesis
    4. 10. Computer vision and image generation
    5. 11. Extracting information from documents, images, audio and video
  4. Generative AI apps and agents in Foundry (skill area 2, 55-60%)

    1. 12. Writing system and user prompts
    2. 13. Deploying a model and chatting with it in the Foundry portal
    3. 14. Building a lightweight chat client with the Foundry SDK
    4. 15. Creating and testing a single agent in the Foundry portal
    5. 16. Building a lightweight client app for an agent
  5. Text, speech, vision and extraction apps in Foundry (skill area 2)

    1. 17. Building a text analysis app
    2. 18. Building speech apps: spoken prompts and Azure Speech
    3. 19. Building vision apps: images in prompts and generated images
    4. 20. Extracting information with Content Understanding: documents and forms
    5. 21. Content Understanding for images, audio and video, and a small extraction app
  6. Final review and four mock exams

    1. 22. Final review and exam day: every decision on one page
    2. 23. Mock exam 1
    3. 24. Mock exam 2
    4. 25. Mock exam 3
    5. 26. Mock exam 4
See the leaderboard

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.

[2]

What comes out of each modality

Exam depth: know it cold.

ModalityContent extractionTypical fields
ImageNo OCR or layout; prebuilt-imageSearch adds a one-paragraph description.Chart type, defects seen, products on a shelf.
AudioA transcript in WebVTT format, split by speaker.Summary, sentiment, call reason, people mentioned.
VideoTranscript, 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.

[60][92][93][94]

Rendering diagram…
Each modality has a base analyzer to build on and a search analyzer that works out of the box. All return Markdown plus fields.

[95]

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.

[93][95]

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.

[93]

Video: segments, shots and key frames

Exam depth: know it cold.

Video analysis runs in two passes.

  1. Content extraction: a transcript of the speech, key frames (still images that represent each shot) and shot detection (where the camera cuts).
  2. 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.

[94][95]

How a tour video is broken upTour video, 3 minutesSegment 1: hotel arrivalSegment 2: tram rideSegment 3: dinnerKey frames per shotTranscript per segmentYour fields per segmentA generative model fillsthese, segment by segment

[94]

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.

[95]

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.

[92][95][125]

Nobody: ... Content Understanding: "Segment 3, 01:42. Guide points at tram. Customer says wow." Picture: Isometric diagram cartoon, clean pastel colors.

Read the code: define a call analyzer

python
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()
Output: an analyzer named fernhill_calls is created on your resource. It uses the client from the next snippet.

[122][125]

Exam depth: know it cold.

  • Lines 5-16 define the field schema. Summary uses generate; CallReason uses 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.

[60][93][125]

Read the code: analyze a call and read the results

python
import os
from azure.ai.contentunderstanding import ContentUnderstandingClient
from azure.ai.contentunderstanding.models import AnalysisInput, AudioVisualContent
from azure.core.credentials import AzureKeyCredential
client = 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 MP3
poller = 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}")
Output: "Reason: refund", a two-sentence summary, then three transcript lines such as "[Speaker 1] 1200 ms: Hi, I booked the Lisbon tour...".

[124][125]

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 an AnalysisInput. 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.

[123][124][125]

In the call app, which line starts the analysis job on the service?

Pick one answer.

[123][124]

[60][92][124][125]

Choosing an analyzer

Exam depth: know it cold.

NeedAnalyzer
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.

[95]

Match

Match each Fernhill Travel need to an analyzer.

Pick an item on the left, then its match on the right.

[92][95][122]

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.

[124]

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.

[60]

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.

[92][125]

FlashcardsIndex cardsFlashcards ⚡

Card 1 of 17

[60][92][93][94][95][124]

Worth keeping

  1. Audio: transcript by speaker, roles, then generated or classified fields.
  2. Video: transcript, key frames and shots, then descriptions and fields per segment.
  3. Images: descriptions or your own fields; text-heavy photos go to a document analyzer.
  4. 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.

[93]

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.

  1. [2]Microsoft Learn: Study guide for Exam AI-901: Microsoft Azure AI Fundamentals
  2. [60]Microsoft Learn: What is Azure Content Understanding in Foundry Tools?
  3. [92]Microsoft Learn: Azure Content Understanding in Foundry Tools image overview
  4. [93]Microsoft Learn: Azure Content Understanding in Foundry Tools audio overview
  5. [94]Microsoft Learn: Azure Content Understanding in Foundry Tools video overview
  6. [95]Microsoft Learn: Azure Content Understanding in Foundry Tools prebuilt analyzers
  7. [122]Microsoft Learn: Azure Content Understanding in Foundry Tools - What is an analyzer? Configuration and reference
  8. [123]Microsoft Learn: Azure AI Content Understanding client library for Python
  9. [124]Microsoft Learn: Quickstart: Azure Content Understanding in Foundry Tools
  10. [125]Microsoft Learn: Create a custom analyzer with Azure Content Understanding in Foundry Tools