Transcription vs. synthesis
The Microsoft Foundry model catalog holds generative models from many providers, each optimized for different tasks. For audio there are two use cases — speech-to-text (transcription) and text-to-speech (synthesis) — and the gpt-4o family of OpenAI models offers specialized speech-capable variants for both. Use the portal's filters and search to match a model to your app.
Key concept · The speech-capable model line-up
Transcription: gpt-4o-transcribe (standard), gpt-4o-mini-transcribe (lightweight), and gpt-4o-transcribe-diarize (adds speaker diarization — who said what). Synthesis: gpt-4o-tts and gpt-4o-mini-tts. Availability varies by region, so check the model regional-availability table before you deploy.
Audio in, text out
Speech-to-text submits audio to the model and returns a text transcript. You use the AzureOpenAI client from the OpenAI SDK, pointed at your Foundry endpoint.
Key concept · The transcription call
Open the audio file in binary mode and call client.audio.transcriptions.create(model=…, file=audio_file, response_format="text"). The key parameters are the model deployment, the binary file, and the response_format (e.g. "text"), against an api_version such as 2025-03-01-preview. The return is the transcript.
Text in, voice out
Text-to-speech is the reverse: submitted text becomes an audio stream of vocalized speech, again through the AzureOpenAI client.
Key concept · The synthesis call
Call client.audio.speech.with_streaming_response.create(model=…, voice="alloy", input="…", instructions="Speak in an upbeat tone") and stream the result to a file. The distinctive parameters are voice (e.g. "alloy"), input (the text), and an optional instructions string that steers the delivery style or tone — a generative twist the classic Speech SDK doesn't have. The output is an audio file you write to disk.
Chapter 18 quiz
Fourteen questions on model choice, transcription, and synthesis. Answer first, then expand Show answer.
Part A · Multiple choice
Which model family provides the speech-capable variants in this module?
- A Phi-4
- B The gpt-4o family
- C FLUX
- D Sora
Show answer
B — gpt-4o. Specialized transcribe and tts variants.
Which model adds speaker diarization?
- A gpt-4o-transcribe-diarize
- B gpt-4o-mini-tts
- C gpt-4o-tts
- D gpt-4o-mini-transcribe
Show answer
A. Diarization identifies who said what.
Which client is used for both transcription and synthesis here?
- A The AzureOpenAI client from the OpenAI SDK
- B TextAnalyticsClient
- C SpeechRecognizer
- D AIProjectClient
Show answer
A. Pointed at the Foundry endpoint.
Which method transcribes audio?
- A client.audio.transcriptions.create
- B client.images.generate
- C client.responses.create
- D recognize_entities
Show answer
A. With model, binary file, and response_format.
Which synthesis parameter steers the delivery style or tone?
- A instructions
- B response_format
- C seconds
- D size
Show answer
A — instructions, e.g. "Speak in an upbeat, excited tone."
What are the two audio use cases the module covers?
- A Transcription and synthesis
- B Translation and summarization
- C Detection and redaction
- D Vision and video
Show answer
A. Speech-to-text and text-to-speech.
Part B · True or false
Model availability for these speech models varies by region.
Show answer
True. Check the regional-availability table before deploying.
The audio file must be opened in binary mode for transcription.
Show answer
True. e.g. open(path, "rb").
The "voice" parameter belongs to the transcription call.
Show answer
False. voice is a synthesis (text-to-speech) parameter.
Synthesis returns an audio stream that you can write to a file.
Show answer
True. Using the streaming response to save the file.
gpt-4o-mini-transcribe is a lightweight transcription model.
Show answer
True. A smaller variant of gpt-4o-transcribe.
Part C · Short answer
Name the three transcription models.
Show answer
gpt-4o-transcribe, gpt-4o-mini-transcribe, and gpt-4o-transcribe-diarize.
Name the two text-to-speech models.
Show answer
gpt-4o-tts and gpt-4o-mini-tts.
Name the three main parameters of the synthesis call.
Show answer
voice, input (the text), and instructions (plus the model deployment).