Speech Solutions
Real-time, fast and batch transcription · text to speech and SSML · Voice Live and voice agents · custom speech · audio with generative models · speech translation
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Speech to text: choose the transcription option
Speech recognition typically uses an acoustic model (audio to phonemes) and a language model (phonemes to words). Azure Speech offers three ways to run it.
| Option | Input and result | Choose it for |
|---|---|---|
| Real-time transcription | Streaming audio from a microphone or stream; intermediate results as speech is recognized | Live captioning, contact center voice agent, agent assist, voice assistant or chatbot |
| Fast transcription | Audio file; synchronous, faster than real time, predictable latency; display form only | Voicemail, video subtitles and editing, meeting notes, analytics right after a call |
| Batch transcription | Large volumes of stored audio, asynchronous, scheduled best-effort; results written to storage | Post-call analytics such as QA, compliance and agent training; large archives |
- Python SDK package:
azure-cognitiveservices-speech. Real-time code builds aSpeechConfig, anAudioConfigand aSpeechRecognizer, connectsrecognizingandrecognizedhandlers, and callsstart_continuous_recognition(). - Batch jobs take audio from a public URI or a shared access signature (SAS) URI. At peak hours a job can take up to 30 minutes to start and up to 24 hours to finish. Submit about 1,000 files in one
Transcription_Createrequest, and check status about every 10 minutes. - Fast transcription models: Azure Transcribe (default when enhanced mode isn't enabled), Azure LLM Speech (enhanced mode) and MAI-Transcribe-2.
- Diarization separates speakers (up to 35). Phrase lists give the model words likely to be spoken. Language identification takes candidate languages in
AutoDetectSourceLanguageConfig: up to four for at-start LID, up to 10 for continuous LID; it adds initial latency, so include it only when needed.
Text to speech
Text to speech needs the text to speak and the voice to use. Standard (neural) voices are available out of the box in 100+ languages and locales; custom voice means professional voice fine-tuning or personal voice.
| Feature | What it does |
|---|---|
| SSML | XML-based markup to adjust pitch, add pauses, improve pronunciation, change rate and volume, and use several voices in one document. Some voices don't support all SSML tags (HD, personal and embedded voices). |
| Batch synthesis API | Asynchronous synthesis of audio longer than 10 minutes, such as audio books or lectures; you poll and download |
| Visemes | Key poses of lips, jaw and tongue per phoneme; used to drive facial animation. Currently for en-US neural voices |
| Custom lexicon | Customizes pronunciation for standard and custom voices |
| Audio Content Creation tool | No-code way to tune speech output in Speech Studio |
- Python flow:
SpeechConfigwithspeech_synthesis_voice_name(for exampleen-US-Ava:DragonHDLatestNeural), anAudioOutputConfig, aSpeechSynthesizer, thenspeak_text_async(text).get(). - Billing counts every character of a successfully processed request, including SSML markup (except the
<speak>and<voice>tags); each Chinese character counts as two.
Speech as an agent modality
Speech-to-speech combines speech-to-text, reasoning and text-to-speech in one conversational experience. The Voice Live API is a fully managed solution for low-latency speech-to-speech for voice agents.
- Voice Live integrates speech recognition, generative AI and text to speech behind one interface; you send audio and get audio, avatar visuals and action triggers back, and you don't deploy or manage the generative models.
- It is designed for compatibility with the Azure OpenAI Realtime API and is supported through WebSocket events (server-to-server). Python package:
azure-ai-voicelive. - Built-in conversation features: noise suppression, echo cancellation, interruption detection and advanced end-of-turn detection; function calling is supported.
- A Foundry Agent Service voice agent has
kindset tovoice. Each create or update makes a new immutable agent version. The interaction mode can't be changed from text to voice on an existing agent. - A native speech-to-speech model processes audio directly; a text-based model uses speech recognition, text response generation and speech synthesis in sequence.
| Symptom in testing | Look at |
|---|---|
| Long or unfocused answers | Response-length guidance and scope in Instructions |
| Premature replies or long waits | Turn detection in Advanced settings |
| Hard-to-understand speech | Voice selection and playback controls |
| Unexplained pauses during tool use | Tool latency; interim responses |
Turn detection decides when the caller has finished. Azure semantic uses the meaning of what is said; Basic uses audio volume and timing, including the silence duration. A longer silence duration allows mid-sentence pauses but delays the reply.
Custom speech and customizing recognition
The base model is a Universal Language Model trained on Microsoft-owned data. A custom model augments it for domain vocabulary (text data) or specific audio conditions (audio with reference transcriptions).
| Problem | Training data |
|---|---|
| Industry vocabulary and grammar, such as medical terms or IT jargon | Plain text or structured text |
| Nonstandard pronunciation, such as product names or acronyms | Pronunciation data, or phonetic pronunciation in structured text |
| Speaking styles, accents or background noise | Audio plus human-labeled transcripts |
- Workflow: create a project, upload test data, train, test (inspect and measure word error rate), then deploy to a custom endpoint.
- Start with plain or structured text: training finishes in minutes, versus days for audio.
- You must deploy a custom endpoint to use a custom model, except for batch transcription, which needs no hosted endpoint.
- A deployed model is fixed until you update it, even when a new base model is released.
- Custom speech models work with real-time speech to text, speech translation and batch transcription.
- In Voice Live, a phrase list is lightweight just-in-time customization of input. For a custom model,
custom_speechis a dictionary of locale code to the endpoint ID of the deployed endpoint (not the model ID); up to 10 languages in total.
Reasoning over audio with generative models
| Need | Use |
|---|---|
| Structured fields from recorded calls: summary, sentiment, entities, plus transcript, diarization and speaker roles | Azure Content Understanding audio analyzer (for example prebuilt-callCenter); you describe fields in natural language |
| Audio in, audio or text out from a generative model | GPT audio models such as gpt-audio |
| Low-latency speech in, speech out conversation | GPT Realtime API (gpt-realtime family) over WebRTC, WebSocket or SIP |
| Real-time translation or transcription models | gpt-realtime-translate; gpt-live-transcribe (current recommended model for realtime transcription) |
| Managed speech-to-speech without deploying a model | Voice Live API |
| Realtime connection | Use case | Latency |
|---|---|---|
| WebRTC | Client-side apps: web, mobile, browser | about 100 ms |
| WebSocket | Server-to-server: backend services, middleware | about 200 ms |
| SIP | Telephony: call centers, IVR | Varies |
- Content Understanding transcripts use WebVTT, separated by speaker. Set
localestoautoor leave it empty for multilingual transcription; configurelocaleswhen you don't use it. - The Realtime API isn't designed to connect directly to end-user devices; it relies on client integrations to terminate the audio stream. Use the GA endpoint format with
/openai/v1. - For transcription settings, pass an ISO-639-1 language hint such as
en. - Structured outputs aren't supported with
gpt-audioandgpt-audio-mini.
Translating speech
| Option | Behavior |
|---|---|
| Standard speech translation API | Real-time; send audio in a specified source language and get translated text, synthesized speech or both in your target language |
| Live Interpreter | Part of real-time speech translation; continuously identifies the spoken language without an input language, switches languages in one session, speech-to-speech in a natural voice that preserves style and tone; optional personal voice |
| Azure LLM Speech (enhanced mode, fast transcription endpoint) | LLM-powered; task set to translate and a required targetLanguage code such as en |
| gpt-realtime-translate | Audio model for real-time multilingual translation with translated speech and text output |
- The Speech service translates the input into up to two target languages in one call. For more than two, create a Foundry resource or use separate translation services.
- The default Azure Transcribe model in fast transcription doesn't translate; Azure LLM Speech does.
- Azure LLM Speech has no separate API: it's the model behind enhanced mode. Custom prompts only guide output formatting; prompts unrelated to speech tasks are typically disregarded.
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Install the Speech Python SDK | pip install azure-cognitiveservices-speech | - |
| Create a recognizer for the microphone | speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audio_config) | - |
| Start real-time recognition | speech_recognizer.start_continuous_recognition() | - |
| Pick a synthesis voice | speech_config.speech_synthesis_voice_name='en-US-Ava:DragonHDLatestNeural' | - |
| Synthesize text to speech | speech_synthesizer.speak_text_async(text).get() | - |
| Install the Voice Live SDK | pip install azure-ai-voicelive | - |
| Batch transcription of many files | Transcription_Create | - |
Exam Tips
Tick each tip once you can answer it without looking.
“Live captions for a webinar while the speaker talks” → Real-time transcription (Speech SDK). Trap: Fast and batch transcription work on audio files, not live streams.
“Voicemail file; transcript needed fast with predictable latency, synchronously” → Fast transcription. Trap: Batch transcription is asynchronous, best-effort, and can take up to 24 hours at peak.
“Thousands of stored call recordings for post-call QA” → Batch transcription (public or SAS URIs). Trap: Submitting jobs faster doesn't speed it up; spread requests and send about 1,000 files per create request.
“Know who said what in a recording” → Diarization (up to 35 speakers). Trap: Phrase lists improve term recognition; they don't separate speakers.
“Audio language unknown, two or three possible languages” → Language identification with candidate locales in AutoDetectSourceLanguageConfig. Trap: At-start LID takes up to four candidates; continuous LID up to 10; adds initial latency.
“Python package for speech recognition and synthesis” → azure-cognitiveservices-speech. Trap: azure-ai-voicelive is for Voice Live; azure-ai-textanalytics is for Language.
“Audio book or lecture longer than 10 minutes, synthesized asynchronously” → Batch synthesis API. Trap: The SDK or REST real-time path returns audio in real time, not by polling.
“Adjust pitch, pauses, rate and pronunciation of synthesized speech” → SSML (some voices, such as HD, support only some tags). Trap: Visemes give lip and jaw positions for animation, not audio changes.
“Low-latency voice agent, no manual orchestration of STT, LLM and TTS” → Voice Live API (managed; WebSocket). Trap: Chaining separate STT, model and TTS pieces is the do-it-yourself path with more engineering and latency.
“Foundry voice agent already created as text; make it voice” → Create a new voice agent: the interaction mode can't be changed. Trap: Editing the existing agent's mode is not possible.
“Voice agent replies too early when callers pause mid-sentence” → Lengthen Basic silence duration, or use Azure semantic turn detection. Trap: A different voice changes how the agent sounds, not when it replies.
“Recognize product names and jargon quickly with little effort” → Phrase list (just in time) or custom speech with plain or structured text. Trap: Audio plus transcripts takes days to train and is for accents and noise.
“Accents and background noise hurt accuracy” → Custom speech trained on audio plus human-labeled transcripts. Trap: Plain text improves vocabulary, not acoustic conditions.
“Plug a custom speech model into Voice Live” → custom_speech: locale code mapped to the deployed endpoint ID. Trap: The trained model ID doesn't work; the endpoint ID is needed.
“Custom model used only for batch transcription” → No hosted custom endpoint required. Trap: Every other use of a custom model needs a deployed custom endpoint.
“Summary, sentiment and entities pulled from call recordings” → Content Understanding audio analyzer (prebuilt-callCenter or custom field schema). Trap: A plain transcription option returns text, not extracted fields.
“Backend service sends audio to the GPT Realtime API; browser app does too” → WebSocket for server-to-server; WebRTC for client-side apps. Trap: SIP is for telephony integration; the Realtime API isn't for direct end-user device connections.
“Translate fast-transcription audio into another language” → Azure LLM Speech in enhanced mode, with task translate and targetLanguage. Trap: The default Azure Transcribe model doesn't translate.
Sources
- Speech recognition (training)
- Speech synthesis (training)
- Creating a speech-capable agent (training)
- Test and improve a voice agent (training)
- Explore and create a voice agent (training)
- Speech to text overview
- Use the fast transcription API
- Batch transcription overview
- Implement language identification
- Text to speech overview
- Voice Live API overview
- Customize Voice Live input and output
- Configure a voice agent
- Custom speech overview
- Training and testing datasets for custom speech
- Content Understanding audio overview
- GPT Realtime API for speech and audio
- Models sold directly by Azure
- Speech translation overview
- Use Azure LLM Speech
- Structured outputs
Checked against Microsoft Learn on November 13, 2026.