Home › Studies › AI-901 › Foundry Solutions › Text & Speech Solutions

Text & Speech Solutions

Text analysis with a general-purpose model or Azure Language · client apps · Azure Language MCP server · Azure Speech recognition and synthesis · Voice Live and voice agents

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Two ways to analyze text in Foundry

Text analysis turns unstructured text into useful information. Foundry offers two approaches: general-purpose AI models that handle many tasks through natural language prompts, and purpose-built language tools that return structured, deterministic results for specific tasks.

General-purpose AI modelAzure Language in Foundry Tools
What it isA language model trained on vast amounts of text data, with a broad understanding of languageA natural language processing service with purpose-built analyzers for specific text analysis tasks
How you use itDeploy a model, then give it natural language instructions: no configuration or training on your partUse a specific feature, for example language detection or PII detection
OutputDepends on how you phrase the prompt; two calls with the same prompt can return slightly different wording or formattingStructured, deterministic output from statistical techniques
Best fitFlexible tasks you can combine in one conversation: sentiment, entities, summaries, translation, questionsAutomated pipelines where consistent results matter

Text analysis tasks

TaskWhat it does
Key phrase extractionLists the main concepts from unstructured text
Named entity recognitionFinds people, places, dates, and other specific entities in text. Prebuilt NER categorizes entries into predefined types; custom NER extracts custom entity categories from a model you build
Entity linkingIdentifies known entities together with a link to Wikipedia
Sentiment analysis and opinion miningClassifies a document as positive, negative, or neutral
SummarizationCondenses text by identifying the most important information. Extractive selects key sentences and keeps their original positions; abstractive writes new, concise sentences that aren't directly copied from the original
Language detectionIdentifies the primary language along with a confidence score
PII detectionIdentifies personal details such as names, phone numbers, email addresses and street addresses, and can optionally redact them

Learn describes these tasks in two ways. The training module lists key phrase extraction, entity linking, sentiment analysis and summarization as tasks a general-purpose model can do from a prompt, and presents language detection and PII detection as Azure Language capabilities. The Azure Language overview lists PII detection, language detection and prebuilt and custom NER as core capabilities, and key phrase extraction, entity linking, sentiment analysis and opinion mining, and summarization under legacy capabilities, which it describes as supported for existing implementations and established use cases. Expect questions to ask what each task does, not which is newer.

Building a text analysis client app

A client application is a program you write that connects to a service or model and uses its capabilities. Both routes need a Foundry resource.

OpenAI API (general-purpose model)Azure Language SDK
Installpip install openaipip install azure-ai-textanalytics
ClientAn OpenAI client built from your endpoint and API keyTextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key))
Callclient.responses.create(...) with your deployment name and a promptdetect_language() and recognize_pii_entities()
ReturnsFree-form model output that can vary between callsdetect_language(): detected language, ISO 639-1 code and a confidence score between 0 and 1. recognize_pii_entities(): the redacted text plus the entities found, each with category and confidence score

Azure Language with an agent (MCP)

A generative model alone can't perform text analysis tasks that require deterministic, structured analysis. Adding Azure Language in Foundry Tools to an agent gives it consistent, predictable text analysis.

Azure Speech: recognition and synthesis

Azure Speech in Microsoft Foundry Tools provides speech-to-text, text-to-speech, and speech translation capabilities through speech recognition and synthesis.

Speech recognition (speech-to-text, STT)Speech synthesis (text-to-speech, TTS)
DirectionDetects and interprets spoken input and converts it into textGenerates spoken output, usually from text
How it worksAn acoustic model converts audio into phonemes; a language model maps phonemes to wordsThe system tokenizes the text, assigns phonetic sounds, and synthesizes audio with a voice, speaking rate, pitch and volume
You provideAudio from a microphone, a file or a streamThe text to be spoken and the voice to be used
Python SDKpip install azure-cognitiveservices-speech; SpeechRecognizerThe same package; SpeechSynthesizer and speak_text_async
Audio setupAudioConfig(use_default_microphone=True)AudioOutputConfig(use_default_speaker=True)

Transcription modes

ModeUse it for
Real-timeInstant transcription with intermediate results for live audio, from a microphone or other audio input
FastFastest synchronous output for situations with predictable latency
BatchLarge volumes of prerecorded audio. Point to files with a shared access signature (SAS) URI and receive results asynchronously. Jobs are scheduled on a best-effort basis, with no estimate for when a job starts running
Custom speechModels with enhanced accuracy for specific domains and conditions

Speech recognition app flow

  1. The app initializes the Speech SDK with an endpoint and authentication (key or Microsoft Entra ID).
  2. Audio is captured from a microphone or loaded from a file or stream.
  3. The SDK sends the audio to Azure Speech.
  4. Speech recognition runs in the cloud.
  5. The app receives the recognized text and optional metadata.

Spoken prompts, speech-to-speech and voice agents

Multimodal models work with more than one type of data at the same time, such as text, images, audio, or video. In Foundry's model selection table, the multimodal type supports images, audio, and video in chat completions. The cached Learn pages don't show code that sends spoken audio to a deployed chat model, so the exam skill respond to spoken prompts by using a deployed multimodal model is only partly covered; the worked Learn routes below are speech-to-speech, Voice Live and voice agents.

Voice agent architectureHow it worksTrade-off
Native speech-to-speechA realtime model handles spoken input and output directlyOptimized for natural, low-latency conversation
Cascaded text modelSpeech recognition, then a text model, then speech synthesisBroader text-model and Azure voice choices and explicit control over transcription, phrase lists, turn detection and interim responses, but each stage contributes to end-to-end latency

Voice Live

Configure and test a voice agent

SymptomWhere to look
Long or unfocused answersResponse-length guidance and task scope in the agent's instructions
Premature replies or excessive waitsTurn detection: Azure semantic uses the meaning of spoken content; Basic uses audio volume and timing, including how much silence ends a turn. With Basic, a longer silence duration allows more time for mid-sentence pauses but can delay the response
Hard-to-understand speechVoice selection and supported playback controls
Unexplained pauses during tool useTool latency and, when supported, an interim response

Exam Tips

Tick each tip once you can answer it without looking.

“An automated pipeline needs the same structured output every run: language code, confidence score, redacted text” → Azure Language in Foundry Tools (SDK or MCP server). Trap: A general-purpose model follows prompts, but two calls with the same prompt can return different wording or formatting.

“Analyze sentiment, pull out entities or summarize with plain-language instructions and no training” → A general-purpose AI model deployed in a Foundry project; try it in the chat playground. Trap: Azure Language analyzers are purpose-built for specific tasks; the prompt route needs no configuration or training.

“Which language is this text written in?” → Language detection: primary language, ISO 639-1 code, confidence score (detect_language()). Trap: recognize_pii_entities() returns redacted text and entities, not the language.

“Find and redact names, phone numbers and addresses before storing or sharing text” → PII detection (recognize_pii_entities() returns the redacted text and the entities found). Trap: Language detection returns only the language, code and confidence.

“Which Python package for the Azure Language SDK?” → pip install azure-ai-textanalytics with TextAnalyticsClient. Trap: openai is for the OpenAI API, azure-cognitiveservices-speech for Speech, azure-ai-voicelive for Voice Live.

“client.responses.create(model=..., input=...) against a deployed model” → OpenAI API client: endpoint + API key; model is your deployment name. Trap: The deployment name is the name you gave the model; it matches the model name only if you didn't customize it.

“An agent needs Azure Language tools without custom integration code” → Add the Azure Language MCP server as a tool; the agent is the MCP client. Trap: You don't call the REST API from agent code, and a Foundry resource already includes Language tools: no separate Language resource.

“Summary built from selected sentences vs. newly written sentences” → Extractive selects key sentences in their original positions; abstractive generates new sentences. Trap: Both condense text; abstractive output isn't directly copied from the original.

“Spoken audio in, text out” → Speech recognition (speech-to-text, STT): SpeechRecognizer. Trap: Speech synthesis is the opposite direction: text to spoken audio.

“Read text aloud, to a speaker or an audio file” → Text-to-speech (speech synthesis): SpeechSynthesizer, needs the text and a voice. Trap: SpeechRecognizer handles incoming audio, not spoken output.

“Live captions or a transcript from a microphone as people speak” → Real-time transcription (continuous recognition with SpeechRecognizer). Trap: Batch jobs are asynchronous and best-effort; there's no estimate for when one starts.

“Many stored recordings, results can arrive later” → Batch transcription: point to the files with a SAS URI and receive results asynchronously. Trap: Fast transcription is synchronous with predictable latency; real-time is for live audio.

“Real-time voice conversation from one managed service: speech recognition + AI reasoning + speech synthesis” → Voice Live API in Azure Speech. Trap: Speech-to-text or text-to-speech alone covers only half the conversation; you also choose a generative AI model.

“Voice agent: realtime model handles audio directly vs. recognition, text model, synthesis” → Native speech-to-speech is optimized for low latency; cascaded gives more model and voice choices and explicit control, but every stage adds latency. Trap: The cascaded design isn't the lower-latency one.

“Voice agent replies too early, waits too long, rambles or is hard to understand” → Early or late replies: turn detection (Basic silence duration, or Azure semantic). Rambling: instructions. Unclear speech: voice. Trap: A different voice doesn't fix an overly long answer; response-length guidance belongs in the instructions.

“Testing a voice agent before release” → Test with spoken requests: pauses, interruptions and clarity. Trap: Typed questions check instructions and answer quality but don't exercise incoming audio, turn detection or spoken delivery.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Generative AI Apps & AgentsVision & Image Generation →