Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 34 of 39
❮Prev Next❯

Speech Translation and Reasoning over Audio

Module 4: Text & Speech ⏱ 9 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    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 needed

    Exam 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.

    Azure portal: Translate speech, then reason over a recording with an audio model Translate speech, then ask an audio model about a recording.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    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
    1. In Azure Speech, open Speech translation. Set the spoken language and one or more target languages.
    2. One pass gives the transcript and every target language. With speech output on, it speaks the translation too.
    3. In code it's SpeechTranslationConfig plus a TranslationRecognizer. Results come back keyed by language code.
    4. For questions about how something was said, you need an audio-capable deployment. gpt-4.1-mini can't take audio.
    5. Attach the recording and ask a question. The model hears tone and pace, which a transcript throws away.
    6. 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.

    😟 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
    🛠️ Solved with: Speech translation and audio models

    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?

    NeedUseWhy
    Transcripts and fixed languages, high volumeSpeech translationCheaper and predictable
    Transcript, then text analysisSpeech to text, then Azure Language or a modelReuse text tools
    Tone, emotion, pace, soundsAudio-capable modelIt hears the audio
    Live conversation across languagesVoice Live or speech translation with a voiceLow 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

    Telecommunications

    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.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    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.

    Question 1

    Question 1 of 5

    Hindi-speaking callers must see English and Tamil text of what they say, from one recognition pass. Which approach should you use?

    Question 2

    Question 2 of 5

    Supervisors want to ask whether a caller sounded frustrated at the start of a recorded call and relieved at the end. A transcript alone is not enough. What should you do?

    Question 3

    Question 3 of 5

    An app sends a WAV file as input_audio to a gpt-4.1-mini deployment and receives an HTTP 400 error. What is the cause?

    Question 4

    Question 4 of 5

    You need to choose between speech translation and sending recordings to an audio model. Support wants transcripts in four fixed languages at the lowest cost, and tone is not required. Which is the best choice?

    Question 5

    Question 5 of 5 · Select 2

    You configure speech translation so that callers hear the translation as well as read it. Which two settings are required? Each correct answer presents part of the solution.

    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. 1.Which SDK object runs speech translation?Show

      TranslationRecognizer.

    2. 2.What content part carries audio to a chat model?Show

      input_audio.

    3. 3.Name an audio-capable model.Show

      gpt-4o-audio-preview.

    4. 4.What do you set to speak the translation?Show

      A voice name.

    5. 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

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.