Speech Translation and Reasoning over Audio
30-second answer
Speech translation in Azure Speech recognises one spoken language and returns text in several target languages in one pass, and can speak the result with a voice name. Use it when you need transcripts, fixed languages and low cost. When the question is about how something was said (tone, emotion, pace, sounds), send the recording to an audio-capable model such as gpt-4o-audio-preview as an input_audio content part. A text-only deployment such as gpt-4.1-mini rejects audio with an error, so deploy an audio model or transcribe first.
Simulate it » No Azure account neededExam objective: 4.2.3 Enable multimodal reasoning from audio inputs. 4.2.4 Translate speech into other languages by using language models and Foundry Tools. (Skills measured as of April 16, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
In <strong>Azure Speech</strong>, open <strong>Speech translation</strong>. Set the spoken language and one or more target languages.
👆 Click the glowing item in the portal to continue
Read the steps as text
- In Azure Speech, open Speech translation. Set the spoken language and one or more target languages.
- One pass gives the transcript and every target language. With speech output on, it speaks the translation too.
- In code it's SpeechTranslationConfig plus a TranslationRecognizer. Results come back keyed by language code.
- For questions about how something was said, you need an audio-capable deployment. gpt-4.1-mini can't take audio.
- Attach the recording and ask a question. The model hears tone and pace, which a transcript throws away.
- In code the audio goes in as an input_audio content part, base64 encoded.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Translate speech and reason over audio
Speech translation recognises one spoken language and returns text in several in one pass, and can speak the result. When the question is about how something was said, send the audio to an audio-capable model such as gpt-4o-audio-preview. A text-only deployment rejects input_audio.
🤔 What happens if…
Read this tour as text
- Entities and strict JSON. A support ticket goes to Azure Language for named entities (fixed categories, confidence scores) or to a model deployment that can return any shape you ask for. A model needs a JSON schema with strict: true before code can trust the fields. JSON mode only promises valid JSON.
- Domain summaries and custom extraction. A plain summary drops what an auditor needs. A domain prompt (role, checklist, glossary, one worked example, temperature 0) fixes that without training. For the same fields at high volume, custom named entity recognition in Azure Language learns your own entity types from labelled examples.
- Sentiment and tone. Sentiment analysis returns positive, neutral, negative or mixed with confidence scores, and opinion mining ties each opinion to its target. It is cheap and steady, but it reads “Oh great, another hour on hold” as positive. For tone, ask a model for a label from an enum.
- Safety, PII and Prompt Shields. Content Safety scores Hate, Sexual, Violence and Self-harm at severity 0, 2, 4 or 6 and you choose the block threshold. PII detection can redact only the categories your policy lists. Prompt Shields checks the user prompt and any document for hidden instructions.
- Translator or an LLM. Azure Translator returns many target languages in one fast call, per character. A dynamic dictionary or Custom Translator protects brand names. An LLM translation flow follows tone and formatting rules written in plain words, but it costs more and can vary, so evaluate it first.
- A voice for the agent. Speech to text turns the caller into words, the agent answers, and text to speech with a neural voice speaks the reply. SSML controls pauses and rate. A phrase list boosts a few words; custom speech is for many terms, accents or noise. Voice Live runs the loop over one low-latency connection.
- Translate speech and reason over audio. Speech translation recognises one spoken language and returns text in several in one pass, and can speak the result. When the question is about how something was said, send the audio to an audio-capable model such as gpt-4o-audio-preview. A text-only deployment rejects input_audio.
Contoso Pharmacy wants a phone agent: it listens, answers and speaks back. Then it has to handle Hindi callers and let supervisors ask questions about recorded calls. Build the speech loop, fix misheard drug names, translate speech and send audio to an audio-capable model.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Hindi callers need English and Tamil text, and supervisors ask how upset a caller sounded.
😊 THE SOLUTION
Translate the speech with Azure Speech, and send the recording to an audio-capable model for tone.
- Spoken Hindi to text in two languages✓ TranslationRecognizer with target languages
- A question about tone and pace✓ An audio-capable deployment such as gpt-4o-audio-preview
- 400 error on input_audio✓ Deploy an audio-capable model
Start with a question
Can a transcript tell you the caller was angry?
Contoso Telecom takes calls in Hindi. The agents read English and Tamil. A supervisor also wants to know how upset a caller sounded at the start of a call and whether they calmed down by the end.
These are two different jobs. One is translating speech. The other is understanding sound. A transcript handles the first and loses the second.
Explain it like I’m 10
The technical explanation
Speech translation
Azure Speech recognises speech in a spoken language and returns text in one or more target languages from the same pass. Set a voice name and it also produces synthesized speech of the translation (speech to speech).
cfg = speechsdk.translation.SpeechTranslationConfig(subscription=KEY, endpoint=ENDPOINT)
cfg.speech_recognition_language = "hi-IN"
cfg.add_target_language("en")
cfg.add_target_language("ta")
cfg.voice_name = "en-IN-NeerjaNeural" # also speak the English translation
rec = speechsdk.translation.TranslationRecognizer(translation_config=cfg, audio_config=audio)
result = rec.recognize_once_async().get()
print(result.text) # what was heard, in Hindi
print(result.translations["en"]) # the English translation
If the caller’s language isn’t known, enable language identification for the candidate languages. Results are keyed by language code.
Reasoning over audio
A transcript keeps the words and loses everything else. Questions about tone, emotion, pace, hesitation or background sounds need a model that takes audio. gpt-4o-audio-preview is one such deployment. The audio goes in as an input_audio content part, base64 encoded:
completion = client.chat.completions.create(
model="gpt-4o-audio-preview",
modalities=["text"],
messages=[{"role": "user", "content": [
{"type": "text", "text": "How did the customer feel at the start and at the end?"},
{"type": "input_audio", "input_audio": {"data": audio_b64, "format": "wav"}},
]}],
)
A text-only deployment such as gpt-4.1-mini returns an error for this request. Deploy an audio-capable model, or transcribe first.
Which pattern?
| Need | Use | Why |
|---|---|---|
| Transcripts and fixed languages, high volume | Speech translation | Cheaper and predictable |
| Transcript, then text analysis | Speech to text, then Azure Language or a model | Reuse text tools |
| Tone, emotion, pace, sounds | Audio-capable model | It hears the audio |
| Live conversation across languages | Voice Live or speech translation with a voice | Low latency |
Architect level Preview model names change
Audio-capable models such as gpt-4o-audio-preview are listed in the Foundry model catalog with their own regions and quotas, and preview names and versions get replaced over time (checked 25 November 2026). In an exam answer, remember the idea: audio in needs an audio-capable deployment. In a project, check the catalog for the current model and region.
Real-world business scenario
Contoso Telecom (fictional)
- The problem
- Hindi-speaking customers called a support line staffed by English and Tamil readers, and supervisors wanted to know which calls started angry, but reading transcripts missed the tone.
- What they used
- Azure Speech translation from hi-IN into English and Tamil for every call, and a gpt-4o-audio-preview deployment used on flagged calls to describe the caller's tone at the start and at the end.
- Why that choice
- Speech translation covered the volume at predictable cost. The audio model was reserved for the questions a transcript can't answer.
- The result
- Agents read live translations during calls, and supervisors reviewed the angriest calls first each morning.
When to use it and when not to
✓ Use it when…
- You need text in several languages from spoken input (speech translation).
- The question is about tone, emotion or sounds in a recording (audio model).
- You want a spoken translation as well as text (set a voice name).
✕ Think twice when…
- You send audio to a text-only deployment.
- You pay for an audio model on every call when transcripts are enough.
- You assume a transcript preserves tone.
↔ Alternatives to consider
- Speech to text, then a text model when you only need the content of the call.
- Voice Live for a real-time spoken conversation.
- Text translation when you already have a transcript.
Test yourself with exercises
5 original practice questions in the AI-103 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner How do you show Hindi callers' words in English and Tamil?
Model answer
Speech translation. I set the spoken language to hi-IN and add en and ta as targets. One recognition pass returns text in both, and with a voice name set it can speak the translation too.
Intermediate When is a transcript not enough?
Model answer
When the answer depends on how it was said. A transcript keeps the words and drops tone, pace, laughter and background sounds. For "was the caller frustrated at the start?" I'd send the audio to an audio-capable model.
Experienced developer Why do you get a 400 when you send input_audio to gpt-4.1-mini?
Model answer
That deployment only takes text and images. Audio input needs an audio-capable model like gpt-4o-audio-preview, or I transcribe with Speech first and send the text.
Scenario Support wants transcripts in four languages for 10,000 calls a week. Do you use an audio model?
Model answer
No. Speech translation gives transcripts and the four languages at lower cost and with predictable output. I'd use an audio model on a smaller sample where supervisors ask about tone, because it costs more per minute.
Quick revision
Key points
- Speech translation returns several target languages from one recognition pass.
- A voice name on the translation config makes it speak the result.
- Transcripts lose tone and pace. Audio-capable models keep them.
- Audio goes in as an input_audio content part, base64 encoded.
- Text-only deployments reject audio input.
Important terminology
- Speech translation
- Azure Speech recognising speech in one language and returning translations in one or more target languages.
- TranslationRecognizer
- The Speech SDK object that runs speech translation. Results come back keyed by language code.
- Speech to speech translation
- Speech translation with a voice name set, so the translation is also spoken.
- Audio-capable model
- A model deployment that accepts audio input, such as gpt-4o-audio-preview.
- input_audio
- The content part type used to send base64-encoded audio to a chat completion request.
Common mistakes
- Sending audio to a text-only deployment.
- Using an audio model for plain transcripts in fixed languages.
- Translating a transcript with text translation when speech translation already returns both.
Exam tips
- "Hindi speech to English and Tamil text" = speech translation.
- "How did the caller sound?" = audio-capable model.
- "Transcripts and fixed languages, lowest cost" = Speech, not an audio model.
Five quick revision questions
-
1.Which SDK object runs speech translation?Show
TranslationRecognizer.
-
2.What content part carries audio to a chat model?Show
input_audio.
-
3.Name an audio-capable model.Show
gpt-4o-audio-preview.
-
4.What do you set to speak the translation?Show
A voice name.
-
5.Which model type rejects input_audio?Show
A text-only deployment such as gpt-4.1-mini.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Ingest and Index Content for RAG
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.