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 model | Azure Language in Foundry Tools | |
|---|---|---|
| What it is | A language model trained on vast amounts of text data, with a broad understanding of language | A natural language processing service with purpose-built analyzers for specific text analysis tasks |
| How you use it | Deploy a model, then give it natural language instructions: no configuration or training on your part | Use a specific feature, for example language detection or PII detection |
| Output | Depends on how you phrase the prompt; two calls with the same prompt can return slightly different wording or formatting | Structured, deterministic output from statistical techniques |
| Best fit | Flexible tasks you can combine in one conversation: sentiment, entities, summaries, translation, questions | Automated pipelines where consistent results matter |
- A Foundry resource is an Azure resource that provides access to AI services and deployed models. A Foundry project is a workspace within that resource where you organize your work, deploy models, and access tools like the chat playground and AI services.
- Explore a deployed general-purpose model in the Foundry portal's chat playground. To test AI services such as Azure Language, go to Build, then Models, then the AI services tab.
Text analysis tasks
| Task | What it does |
|---|---|
| Key phrase extraction | Lists the main concepts from unstructured text |
| Named entity recognition | Finds 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 linking | Identifies known entities together with a link to Wikipedia |
| Sentiment analysis and opinion mining | Classifies a document as positive, negative, or neutral |
| Summarization | Condenses 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 detection | Identifies the primary language along with a confidence score |
| PII detection | Identifies 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 | |
|---|---|---|
| Install | pip install openai | pip install azure-ai-textanalytics |
| Client | An OpenAI client built from your endpoint and API key | TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(key)) |
| Call | client.responses.create(...) with your deployment name and a prompt | detect_language() and recognize_pii_entities() |
| Returns | Free-form model output that can vary between calls | detect_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 |
- The OpenAI API lets your code talk to a deployed model by sending requests to an endpoint, along with an API key to prove you're authorized. The Responses API is the modern, unified API within Azure OpenAI for interacting with language models.
- The model deployment name is the name you give the model when you deploy it. If you do not customize the model name, the deployment name matches the model name.
- When your app needs consistent, structured values, such as a language code, confidence score, or redacted text, the Azure Language SDK is a better choice.
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.
- The Model Context Protocol (MCP) is an open standard that defines how AI agents connect to external tools and data sources.
- The MCP client is the AI agent (or the host application running the agent). The MCP server is the service that exposes tools, data, or actions.
- The Azure Language MCP server is a managed service that exposes Azure Language in Foundry Tools capabilities through MCP. You don't need to call the Azure Language REST API directly or manage authentication tokens in your agent code.
- In the Foundry portal, deploy a model and save it as an agent, then add the Azure Language MCP server as a tool by searching tools for Azure Language in Foundry Tools. Typical uses: routing support tickets by detected language, and identifying and redacting PII.
- A Foundry resource already includes access to Language tools. You don't need a separate Azure Language resource to access the Azure Language MCP server.
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) | |
|---|---|---|
| Direction | Detects and interprets spoken input and converts it into text | Generates spoken output, usually from text |
| How it works | An acoustic model converts audio into phonemes; a language model maps phonemes to words | The system tokenizes the text, assigns phonetic sounds, and synthesizes audio with a voice, speaking rate, pitch and volume |
| You provide | Audio from a microphone, a file or a stream | The text to be spoken and the voice to be used |
| Python SDK | pip install azure-cognitiveservices-speech; SpeechRecognizer | The same package; SpeechSynthesizer and speak_text_async |
| Audio setup | AudioConfig(use_default_microphone=True) | AudioOutputConfig(use_default_speaker=True) |
Transcription modes
| Mode | Use it for |
|---|---|
| Real-time | Instant transcription with intermediate results for live audio, from a microphone or other audio input |
| Fast | Fastest synchronous output for situations with predictable latency |
| Batch | Large 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 speech | Models with enhanced accuracy for specific domains and conditions |
Speech recognition app flow
- The app initializes the Speech SDK with an endpoint and authentication (key or Microsoft Entra ID).
- Audio is captured from a microphone or loaded from a file or stream.
- The SDK sends the audio to Azure Speech.
- Speech recognition runs in the cloud.
- The app receives the recognized text and optional metadata.
- Text-to-speech output can be played directly through a computer speaker or written to an audio file. Neural voices use neural networks, and you can adjust parameters such as speed and pitch. Speech Synthesis Markup Language (SSML) fine-tunes pitch, pronunciation, speaking rate and volume.
- Azure Speech needs a Foundry resource. Its endpoint and key are used in your code to authenticate the connection (a key or Microsoft Entra ID).
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.
- Speech-to-speech lets an application take spoken audio as input and produce spoken audio as output. It combines speech-to-text and text-to-speech into one conversational experience.
- As a pipeline it has three stages: speech-to-text, processing or reasoning (analyzing, translating, summarizing, or an agent deciding what to say), then text-to-speech.
| Voice agent architecture | How it works | Trade-off |
|---|---|---|
| Native speech-to-speech | A realtime model handles spoken input and output directly | Optimized for natural, low-latency conversation |
| Cascaded text model | Speech recognition, then a text model, then speech synthesis | Broader 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
- The Voice Live API lets applications have real-time voice conversations. Instead of connecting separate speech-to-text, AI reasoning and text-to-speech pieces, it combines everything into one service that Azure fully manages.
- You choose a generative AI model for the agent. Voice Live uses that model alongside its own acoustic models. With a fully managed Voice Live model you don't deploy a separate audio model.
- Enable Voice mode for a Foundry agent in the playground to integrate Voice Live into the agent definition. In Python, install
azure-ai-voicelive. - Voice-based agents and some related capabilities are in preview. Preview capabilities are provided without a service-level agreement.
Configure and test a voice agent
| Symptom | Where to look |
|---|---|
| Long or unfocused answers | Response-length guidance and task scope in the agent's instructions |
| Premature replies or excessive waits | Turn 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 speech | Voice selection and supported playback controls |
| Unexplained pauses during tool use | Tool latency and, when supported, an interim response |
- A voice agent brings together listening (receives audio and detects when the caller finishes a turn), reasoning (a model, instructions and connected tools) and speaking (the response in the selected voice).
- Voice selection changes the sound of the response. Instructions change its content and style. The Greeting setting controls whether the agent speaks when a session starts.
- You can't change an existing agent's interaction mode from text to voice. Typed questions don't exercise incoming audio, turn detection, or spoken delivery, so test with spoken requests.
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
- Get started with text analysis in Azure: Understand text analysis in Foundry
- Get started with text analysis in Azure: Create a client application that analyzes text
- Get started with text analysis in Azure: Use Azure Language with an agent
- What is Azure Language in Foundry Tools
- Get started with speech in Azure: Introduction
- Get started with speech in Azure: Speech recognition
- Get started with speech in Azure: Speech synthesis
- Get started with speech in Azure: Creating a speech-capable agent
- Speech to text overview
- What is Azure Speech?
- Voice Live API overview
- Foundry Agent Service overview
- Get started with voice agents: Explore and create a voice agent
- Get started with voice agents: Configure a voice agent for a scenario
- Get started with voice agents: Test and improve a voice agent
- Get started with generative AI and agents: Generative AI models
- Get started with computer vision in Azure: Multimodal models for image analysis
Checked against Microsoft Learn on November 13, 2026.