BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeDeveloping AI Apps and Agents on Azure (AI-103)Implement workflows to convert speech to text and text to speech for agentic interactions
Lesson2,683 words

Implement workflows to convert speech to text and text to speech for agentic interactions

AI-103 › Unit 4: Implement text analysis solutions › Implement speech solutions › Implement workflows to convert speech to text and text to speech for agentic interactions

Implement workflows to convert speech to text and text to speech for agentic interactions

Speech to text has three modes, and choosing among them is decided by one property: whether the audio is streaming, a file you want back quickly, or a large volume you can wait for. Text to speech then adds voice choice and SSML. For agentic interactions the constraint tightening everything is latency, which is why Voice Live exists as its own path.

Why This Matters

The three transcription modes are not interchangeable. Real-time is for streaming, fast transcription is for pre-recorded files, and batch is for "large volumes of audio asynchronously".

SSML is the control surface for synthesis. It fine-tunes "the pitch, pronunciation, speaking rate, volume, and more" — properties no plain-text request can express.

Conversational speech is a latency problem. Voice Live provides "fast, reliable interaction between a human and an agent implementation" — the purpose-built path rather than assembling STT, a model, and TTS yourself.

Three modes, one question each

Streaming audio, live → real-time transcription. A pre-recorded file, answer wanted now → fast transcription. Large volumes, processed asynchronously → batch transcription. And for a live two-way conversation with an agent, the answer is usually Voice Live, not a hand-built pipeline.

Prerequisites

  • That speech services run through a Foundry resource.
  • The difference between streaming and file-based processing.
  • What a neural voice is.
  • Basic latency reasoning: time to first token and time to first audio.

Learning Objectives

By the end of this lesson you will be able to:

  1. Select among real-time, fast, and batch transcription.
  2. Choose standard or custom voice, and control output with SSML.
  3. Design an agentic speech loop and know when to use Voice Live.
  4. Apply language identification and captioning features.
  5. Deploy speech on-premises with containers where required.

Building Blocks

Speech to text modes.

ModeFor
Real-time transcriptionStreaming audio
Fast transcriptionPre-recorded audio files
Batch transcription"Processing large volumes of audio asynchronously"

When the base model is not enough. "The base model might not be sufficient if the audio contains ambient noise or includes industry and domain-specific jargon. In these cases, you can create and train custom speech models with acoustic, language, and pronunciation data. Custom speech models are private and can offer a competitive advantage."

Text to speech. Converts text "into humanlike synthesized speech" using neural voices. Use SSML "to fine-tune the pitch, pronunciation, speaking rate, volume, and more."

Voice options. Standard voice — "highly natural out-of-the-box voices" from the Voice Gallery. Custom voice — "recognizable and unique to your brand or product", and "custom voices are private and can offer a competitive advantage".

Text-to-speech avatar. Converts text "into a digital video of a photorealistic human speaking". The video "can be synthesized asynchronously or in real time". Note two constraints: "you can choose from a range of standard voices for the avatar", and "the language support for text-to-speech avatar is the same as the language support for text to speech".

Voice Live. "Create natural, humanlike conversational interfaces… provides fast, reliable interaction between a human and an agent implementation."

Language identification. "Helps you identify languages spoken in audio by comparing them against a list of supported languages. Use language identification by itself, with speech-to-text recognition, or with speech translation."

Captioning. Covers synchronising captions with input audio, applying profanity filters, getting partial results, applying customizations, and identifying spoken languages for multilingual scenarios.

Access and deployment. Speech SDK, Speech CLI, and REST APIs — the guidance notes REST is used "for example… for batch transcription". Containers bring the service "closer to your data for compliance, security, or other operational reasons".

The three transcription modes

Attribute
Input

Streaming audio

Pre-recorded file

Large volumes of files

Timing

As it arrives

Quickly, on request

Asynchronous

Partial results

Yes

No

No

Fits

Live captioning, dictation, conversation

A voicemail, one meeting recording

A call-centre archive

Typical surface

Speech SDK

SDK or REST

REST

Deep Dive

Choosing the transcription mode

The distinction people miss is between fast and batch, because both take files.

Real-time transcription is for streaming audio — the audio does not exist yet when you start. It produces partial results, which is what makes live captioning and dictation feel responsive, and it is the mode a conversational agent's listening side uses.

Fast transcription is for pre-recorded audio files where you want the result promptly. One voicemail, one uploaded recording, one clip a user just dropped in. The file exists, and the interaction is synchronous from the caller's perspective.

Batch transcription is for "processing large volumes of audio asynchronously". The workload is a queue, not a request, and REST is the documented surface for it.

So the discriminator is volume and patience, not file-versus-stream: a single file wanted now is fast; ten thousand files processed overnight is batch.

Building the speech loop for an agent

  1. 1

    Choose the listening mode

    A live conversation streams, so real-time transcription — or Voice Live for the whole loop.

Text to speech, and what SSML controls

Plain text sends words; SSML sends a performance.

The documented levers are "the pitch, pronunciation, speaking rate, volume, and more". Each maps to a real requirement. Pronunciation is the one that matters most in practice — product names, acronyms, and personal names are routinely mangled, and SSML is where the correct rendering is specified. Rate governs comprehension for instructions or accessibility. Pitch and volume carry emphasis.

The voice choice sits alongside. Standard voices are "highly natural out-of-the-box", chosen from the Voice Gallery — right for most applications. A custom voice is "recognizable and unique to your brand or product" and is private, which is the competitive-advantage argument. Custom voice also carries the heaviest responsible-AI framing on the service, with limited access, disclosure of voice talent, and disclosure design guidelines and patterns.

One avatar constraint is quietly examinable: the text-to-speech avatar offers "a range of standard voices", and its language support is the same as text to speech. So an avatar requirement paired with a custom brand voice is asking for something the documented options do not describe.

Agentic interactions and Voice Live

A voice agent is a loop: listen, understand, respond, speak. Assembled by hand, that is real-time transcription, then a model call, then synthesis — and the latency is the sum of all three, plus turn-taking logic for interruption and silence.

Voice Live exists for this: "create natural, humanlike conversational interfaces for applications and experiences. The Voice Live feature provides fast, reliable interaction between a human and an agent implementation."

Two design points follow.

Prefer the purpose-built path for conversation. A scenario describing a live two-way voice conversation with an agent is usually pointing at Voice Live, not at a hand-assembled pipeline — the same instinct as preferring a managed orchestration to bespoke plumbing.

Assemble the pipeline when the stages are genuinely separate. Transcribe a call now and analyse it later; synthesise a notification with no listening side; caption a stream without responding. These are not conversations, and the three-stage split is correct.

Where the pipeline is assembled, streaming matters twice: partial results on the listening side, and beginning synthesis before the full response is generated on the speaking side. Both reduce perceived latency without changing total work — the same principle as streaming tokens in text.

Custom speech and custom voice are different customizations

Custom speech models improve recognition — trained with acoustic, language, and pronunciation data for ambient noise or domain jargon. Custom voice changes synthesis — a brand-specific voice for output. They sit on opposite sides of the loop, and a scenario about mis-transcribed product names needs the first, while one about brand identity in the spoken response needs the second.

Language, captions, and deployment

Three supporting capabilities round out the design.

Language identification "helps you identify languages spoken in audio by comparing them against a list of supported languages", and its flexibility is the examinable part: it works "by itself, with speech-to-text recognition, or with speech translation". So it can be a standalone routing step, an input to transcription, or an input to translation.

Captioning covers synchronising captions with audio, profanity filters, partial results, customizations, and identifying spoken languages "for multilingual scenarios". Partial results appear here and in real-time transcription for the same reason — captions must appear before an utterance ends.

Containers bring speech on-premises "for compliance, security, or other operational reasons", and sovereign clouds are available for some government entities — Azure Government for US entities, and Azure operated by 21Vianet for organisations with a business presence in China.

Worked Examples

Example 1 — one voicemail, answer now. A user uploads a voicemail and expects a transcript immediately.

Fast transcription, which is for pre-recorded audio files. Batch is for "large volumes… asynchronously" and would make a single request wait on a queue; real-time is for streaming audio that does not exist yet.

Example 2 — mis-transcribed product names. A support agent mishears domain terminology, and background noise is common in customer environments.

A custom speech model — the documented triggers are exactly "ambient noise" and "industry and domain-specific jargon" — trained with acoustic, language, and pronunciation data. A custom voice would not help: that changes synthesis, and the failure is in recognition.

Example 3 — a live voice assistant. A product needs natural two-way voice conversation with an agent, including quick turn-taking.

Voice Live, which "provides fast, reliable interaction between a human and an agent implementation". Hand-assembling real-time transcription, a model call, and synthesis makes latency the sum of three stages plus turn-taking logic — reasonable when the stages are genuinely separate, and the wrong default for a conversation.

Visual Explanations

Choosing the transcription mode:

Loading Diagram...
Figure 1 — Mermaid diagram

The two customizations, on opposite sides:

Loading Diagram...
Figure 2 — Mermaid diagram

Common Mistakes

Confusing fast with batch. Fast is a pre-recorded file; batch is large volumes, asynchronously.

Using real-time for files. Real-time is for streaming audio.

Reaching for custom voice to fix recognition. That needs a custom speech model.

Expecting plain text to control pronunciation. That is SSML.

Hand-assembling a conversation loop where Voice Live fits.

Pairing an avatar with a custom voice. The avatar offers standard voices.

Forgetting language identification can run standalone, with STT, or with translation.

Overlooking containers under a residency requirement.

Practice Exercises

  1. Give the three transcription modes and the deciding question for each.
  2. What triggers a custom speech model, and what data trains it?
  3. Distinguish custom speech from custom voice.
  4. What does SSML control, and why can plain text not?
  5. When is Voice Live preferable to assembling the pipeline?
▶Answers
  1. Real-time — is the audio streaming, not yet complete? Fast — is it a pre-recorded file wanted promptly? Batch — is it "large volumes of audio" processed "asynchronously"? The fast/batch discriminator is volume and patience, not file-versus-stream.
  2. "The base model might not be sufficient if the audio contains ambient noise or includes industry and domain-specific jargon." It is trained with acoustic, language, and pronunciation data, and custom speech models are private.
  3. Custom speech improves recognition — the listening side — trained on acoustic, language, and pronunciation data. Custom voice changes synthesis — the speaking side — giving a voice "recognizable and unique to your brand or product". Both are private.
  4. It fine-tunes "the pitch, pronunciation, speaking rate, volume, and more". Plain text carries only words, so pronunciation of product names and acronyms, delivery pace, and emphasis have no channel without SSML.
  5. For a live two-way conversation with an agent — it "provides fast, reliable interaction between a human and an agent implementation", where a hand-assembled loop makes latency the sum of transcription, model call, and synthesis plus turn-taking logic. Assemble the pipeline when the stages are genuinely separate, such as transcribe-now-analyse-later.

Summary & Concept Map

Speech to text offers real-time for streaming audio, fast for pre-recorded files wanted promptly, and batch for "large volumes… asynchronously" — the fast/batch line being volume and patience rather than file-versus-stream. When ambient noise or domain jargon defeats the base model, a custom speech model trained with acoustic, language, and pronunciation data fixes recognition; a custom voice is the separate, synthesis-side customization for brand identity, and both are private. SSML is the only channel for pitch, pronunciation, speaking rate, and volume. For agentic interaction, Voice Live provides "fast, reliable interaction between a human and an agent implementation", and is preferable to hand-assembling three stages whenever the requirement is a genuine conversation. Around these sit language identification — usable standalone, with STT, or with translation — captioning with profanity filters and partial results, and containers for on-premises deployment.

Loading Diagram...
Figure 3 — Mermaid diagram
Loading flashcards…

Sources and freshness

Written against current Microsoft Learn documentation for the AI-103 skills measured (16 April 2026), reviewed 2026-08-20. Microsoft Learn controls every changing product contract — availability, preview status, quotas, limits, regional support, naming, and retirement dates all move independently of this lesson. Where a scenario turns on a specific number or a GA/preview boundary, confirm it against the product's own page before relying on it.

All Developing AI Apps and Agents on Azure (AI-103) Study Resources

Related Notes

  • Choose an appropriate method for retrieval and indexing2,778 words
  • Quick Note — Choose an appropriate method for retrieval and indexing888 words
  • Choose an appropriate model for each task, including LLMs, small language models, multimodal models, and Foundry Tools3,097 words
  • Quick Note — Choose an appropriate model for each task, including LLMs, small language models, multimodal models, and Foundry Tools1,041 words
  • Choose appropriate memory, tool, and knowledge integration services for agent solutions2,815 words
  • Quick Note — Choose appropriate memory, tool, and knowledge integration services for agent solutions949 words
  • Choose the appropriate Foundry services for generative tasks, grounding, vector search, agent workflows, or multimodal processing2,733 words
  • Quick Note — Choose the appropriate Foundry services for generative tasks, grounding, vector search, agent workflows, or multimodal processing901 words
  • Apply responsible AI instrumentation, including evaluators, safety evaluations, and explanation tooling2,891 words
  • Configure safety filters, guardrails, risk detection, and content moderation2,795 words
  • Govern agent behavior with oversight modes, constraints, and tool-access controls2,863 words
  • Implement auditing through trace logging, provenance metadata, and approval workflows2,624 words

Ready to study Developing AI Apps and Agents on Azure (AI-103)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study Developing AI Apps and Agents on Azure (AI-103)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
Developing AI Apps and Agents on Azure (AI-103) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, top to bottom. Audio connects to Does the audio exist yet?. S connects to REAL-TIME<br/>partial results,<br/>live captioning, dictation (No - streaming). S connects to Volume and patience? (Yes - a file). V connects to FAST transcription (One file, answer now). V connects to BATCH transcription<br/>asynchronous, REST (Many files, can wait). RT connects to Two-way conversation<br/>with an agent?. VL connects to VOICE LIVE - purpose-built (Yes).
Loading Diagram...
Flowchart, left to right. Human speaks connects to Speech to text. STT connects to CUSTOM SPEECH MODEL<br/>acoustic + language + pronunciation data<br/>fixes ambient noise and jargon. STT connects to Agent reasons. AG connects to Text to speech. TTS connects to CUSTOM VOICE<br/>brand identity, private. TTS connects to SSML: pitch, pronunciation,<br/>rate, volume. CV connects to Human hears. SS connects to OUT.
Loading Diagram...
Flowchart, top to bottom. Speech workflows connects to Speech to text. Speech workflows] --> STT[Speech to text connects to Text to speech. Speech workflows] --> STT[Speech to text connects to Agentic loop. Speech workflows] --> STT[Speech to text connects to Supporting. STT connects to Real-time: streaming, partial results. STT connects to Fast: pre-recorded file, prompt. STT connects to Batch: large volumes, async, REST. STT connects to Custom speech: noise + jargon,<br/>acoustic/language/pronunciation data. 9 more statements.

Speech workflows — retrieval

Card 1 of 6

Front of flashcard 1 of 6

The three transcription modes

medium

Real-time for streaming audio (partial results). Fast for pre-recorded audio files wanted promptly. Batch for "processing large volumes of audio asynchronously". The fast/batch line is volume and patience, not file-versus-stream.

stt

Speech workflows — retrieval

Card 1

Front

The three transcription modes

Back

Real-time for streaming audio (partial results). Fast for pre-recorded audio files wanted promptly. Batch for "processing large volumes of audio asynchronously". The fast/batch line is volume and patience, not file-versus-stream.

Card 2

Front

When to train a custom speech model

Back

"The base model might not be sufficient if the audio contains ambient noise or includes industry and domain-specific jargon." Trained with acoustic, language, and pronunciation data; models are private.

Card 3

Front

Custom speech vs custom voice

Back

Custom speech improves recognition (listening side) for noise and jargon. Custom voice changes synthesis (speaking side) — "recognizable and unique to your brand or product". Opposite ends of the loop; both private.

Card 4

Front

What SSML controls

Back

It fine-tunes "the pitch, pronunciation, speaking rate, volume, and more". Pronunciation is the practically important one — product names, acronyms, and personal names have no other channel.

Card 5

Front

Voice Live

Back

"Create natural, humanlike conversational interfaces… provides fast, reliable interaction between a human and an agent implementation." Prefer it for genuine two-way conversation over hand-assembling transcription, model call, and synthesis.

Card 6

Front

Avatar constraints

Back

The text-to-speech avatar synthesises asynchronously or in real time, offers "a range of standard voices", and its language support is the same as text to speech. An avatar with a custom brand voice is not among the documented options.

Speech workflows — retrieval

Card 1

Front

The three transcription modes

Back

Real-time for streaming audio (partial results). Fast for pre-recorded audio files wanted promptly. Batch for "processing large volumes of audio asynchronously". The fast/batch line is volume and patience, not file-versus-stream.

Card 2

Front

When to train a custom speech model

Back

"The base model might not be sufficient if the audio contains ambient noise or includes industry and domain-specific jargon." Trained with acoustic, language, and pronunciation data; models are private.

Card 3

Front

Custom speech vs custom voice

Back

Custom speech improves recognition (listening side) for noise and jargon. Custom voice changes synthesis (speaking side) — "recognizable and unique to your brand or product". Opposite ends of the loop; both private.

Card 4

Front

What SSML controls

Back

It fine-tunes "the pitch, pronunciation, speaking rate, volume, and more". Pronunciation is the practically important one — product names, acronyms, and personal names have no other channel.

Card 5

Front

Voice Live

Back

"Create natural, humanlike conversational interfaces… provides fast, reliable interaction between a human and an agent implementation." Prefer it for genuine two-way conversation over hand-assembling transcription, model call, and synthesis.

Card 6

Front

Avatar constraints

Back

The text-to-speech avatar synthesises asynchronously or in real time, offers "a range of standard voices", and its language support is the same as text to speech. An avatar with a custom brand voice is not among the documented options.