SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Implement text analysis solutions

AI-103: Speech Solutions — Voice Agents, Custom Speech and Speech Translation

20 min readAI-103 · Implement text analysis solutionsUpdated

Implementing speech solutions for AI-103 means giving apps and agents ears and a voice: converting speech to text and text to speech with Azure Speech in Foundry Tools, running spoken agent conversations through the Voice Live API, improving recognition with phrase lists and custom speech models, letting audio-capable models reason over audio directly, and translating speech with the Speech SDK or language models. The skill is choosing the right path for each requirement — live or recorded audio, recognition or output, a trained model or a runtime fix — and configuring it correctly.

What you’ll learn

  • Choose between real-time recognition, fast transcription, batch transcription and LLM Speech by latency, volume, output form and custom-model hosting.
  • Synthesize agent replies with the Speech SDK, control pace and pauses with SSML, pick telephony output formats, and fix pronunciation with SSML elements or a custom lexicon.
  • Use the Voice Live API as an agent's speech modality, including connecting it to a Foundry Agent Service agent with Microsoft Entra ID.
  • Decide between a phrase list and a custom speech model, pick training data by error type, test with WER, and call the model from the SDK, batch jobs and Voice Live.
  • Select professional custom voice, personal voice or a prebuilt voice for an agent's output.
  • Send audio to audio-capable models for multimodal reasoning and connect to the GPT Realtime API with the right transport and credential pattern.
  • Translate speech with the Speech SDK, Live Interpreter, LLM Speech or a transcribe-then-translate pipeline.

The 10 parts · about 12 min of reading

  1. Which speech-to-text path fits a workload?Start hereReal-time SDK for live audio, fast transcription for one file now, batch for stored sets, LLM Speech when a prompt shapes output.2 min
  2. How do you turn an agent's text replies into speech?A SpeechSynthesizer speaks with speech_synthesis_voice_name; SSML sets pace, pauses and style, and the output format fits the gateway.1 min
  3. How do you control how an agent pronounces names and acronyms?Fix output pronunciation on the synthesis side: SSML sub, say-as or phoneme for one place, a case-sensitive PLS lexicon everywhere.1 min
  4. How does the Voice Live API make speech an agent modality?One WebSocket session joins recognition, a model and TTS with echo cancellation, turn detection, avatars and an agent mode.1 min
  5. Phrase list or custom speech model?Phrase lists boost a modest word list at run time with no training, but do nothing in batch jobs or with OpenAI transcription models.1 min
  6. How do you train, test and use a custom speech model?Pick text, audio, pronunciation or display-format data by error type, measure WER on labelled audio, then point the app at the model.2 min
  7. Which voice gives an agent a brand or personal voice?Professional custom voice gives a unique brand voice, personal voice copies one user from a consented sample, prebuilt is shared.1 min
  8. How do models reason over audio directly, and how do you connect to them?Audio-capable models take base64 input_audio parts to hear tone and background sounds; gpt-realtime streams over WebRTC, WebSockets or SIP.1 min
  9. How do you translate speech with the Speech SDK and Live Interpreter?A TranslationRecognizer maps a source locale to target codes; Live Interpreter follows speakers’ switching languages and can use personal voice.1 min
  10. How do language models translate speech?LLM Speech translates audio to any chosen language, whisper only into English, and transcribe-then-translate keeps an approved transcript.1 min

Mind map

Real-time SDK for live audioFast transcription: one file,synchronousBatch: many files, custom model, noendpointLLM Speech: prompt and translate1✓Speech-to-text pathsspeech_synthesis_voice_name picks thevoiceSSML only through speak_ssml_asyncprosody rate, break time, express-asRaw formats are headerless; mu-law vsA-law2✓Text to speechsub alias, say-as, phoneme: one placePLS lexicon applies everywhereLexicon matching is case-sensitiveVoice Live: custom_lexicon_url3✓Pronunciation controlSTT, model and TTS in one WebSocketEcho cancellation and end-of-turndetectionAgent mode: agent_name andproject_nameAgent mode requires Entra ID, not keys4✓Voice Live APIPhrase list: run time, no trainingNot in batch or OpenAI transcriptionVoice Live phrase_list needsazure-speechThousands of terms: custom speech5✓Phrase list vs custommodelText data for vocabulary, audio fornoiseWER needs audio plus labelledtranscriptsReal-time needs endpoint_idVoice Live custom_speech keyed bylocale6✓Custom speech modelsProfessional custom voice: brand voicePersonal voice: user sample plusconsentPrebuilt voices are shared by everyoneVoice Live: azure-custom plusendpoint_id7✓Brand and personal voicesinput_audio part with base64 datamodalities text and audio for spokenrepliesRealtime: WebRTC, WebSockets or SIPBrowser gets only an ephemeral token8✓Audio-native modelsSource locale, target language codesBuilt-in voice output: one target onlyLive Interpreter: follows languageswitches9✓Speech SDK translationLLM Speech: audio to a chosen languagewhisper translates only into EnglishTranscribe then translate keeps atranscript10✓Model speech translationSpeech for agentsand translation
Mind map

AI-103: Speech Solutions — Voice Agents, Custom Speech and Speech Translation

Real-time SDK for live audioFast transcription: one file,synchronousBatch: many files, custom model, noendpointLLM Speech: prompt and translate1✓Speech-to-text pathsspeech_synthesis_voice_name picks thevoiceSSML only through speak_ssml_asyncprosody rate, break time, express-asRaw formats are headerless; mu-law vsA-law2✓Text to speechsub alias, say-as, phoneme: one placePLS lexicon applies everywhereLexicon matching is case-sensitiveVoice Live: custom_lexicon_url3✓Pronunciation controlSTT, model and TTS in one WebSocketEcho cancellation and end-of-turndetectionAgent mode: agent_name andproject_nameAgent mode requires Entra ID, not keys4✓Voice Live APIPhrase list: run time, no trainingNot in batch or OpenAI transcriptionVoice Live phrase_list needsazure-speechThousands of terms: custom speech5✓Phrase list vs custommodelText data for vocabulary, audio fornoiseWER needs audio plus labelledtranscriptsReal-time needs endpoint_idVoice Live custom_speech keyed bylocale6✓Custom speech modelsProfessional custom voice: brand voicePersonal voice: user sample plusconsentPrebuilt voices are shared by everyoneVoice Live: azure-custom plusendpoint_id7✓Brand and personal voicesinput_audio part with base64 datamodalities text and audio for spokenrepliesRealtime: WebRTC, WebSockets or SIPBrowser gets only an ephemeral token8✓Audio-native modelsSource locale, target language codesBuilt-in voice output: one target onlyLive Interpreter: follows languageswitches9✓Speech SDK translationLLM Speech: audio to a chosen languagewhisper translates only into EnglishTranscribe then translate keeps atranscript10✓Model speech translationSpeech for agentsand translation

How the exam tests this

Expect short scenarios — a contact center, a kiosk, a dictation app or a voice agent — with one deciding requirement such as least engineering effort, no training data, no hosted endpoint, one synchronous call, recognize the audio only once, no credential in the browser, or output in the speaker's own voice, followed by "what should you use or configure?". Many items hinge on whether a problem sits on the recognition side or the output side, and on which feature works on which path (phrase lists, custom models, language detection). Short Python snippets ask which SpeechConfig property, SSML element, content part or call arguments complete the code, and several items ask you to select TWO actions that must both be done.

Key takeaways

  1. Live audio → real-time Speech SDK; one file, synchronous → fast transcription (display form only); many stored files → batch transcription (lexical form available, custom model without an endpoint).
  2. Select a voice with speech_synthesis_voice_name; SSML (prosody rate, break time, styles) needs speak_ssml_async; Raw formats have no header, and 8 kHz mu-law is North American/Japanese telephony while A-law is European.
  3. Output pronunciation is fixed on the TTS side: sub for a one-off spoken alias, a case-sensitive PLS custom lexicon (phoneme or alias) for every reply, custom_lexicon_url in Voice Live.
  4. Voice Live is the managed speech-to-speech layer: noise suppression, echo cancellation, end-of-turn detection, avatars; agent mode takes agent_name + project_name and requires Entra ID.
  5. Phrase lists are runtime, no-training boosts for modest lists; they don't work in batch transcription or with whisper/gpt-4o-transcribe in Voice Live — use custom speech or azure-speech instead.
  6. Custom speech data follows the error: text for vocabulary, audio + human-labeled transcripts for noise and accents (and for WER testing), plus pronunciation and display formatting rules.
  7. A custom speech model needs a custom endpoint and endpoint_id for real-time recognition and speech translation, batch references it directly, and fast transcription/LLM Speech take none; per-language custom models go in SourceLanguageConfig; Voice Live custom_speech maps locale to model ID, azure-speech only, same Foundry resource.
  8. Professional custom voice = one brand voice from studio data (azure-custom + endpoint_id); personal voice = a user's own voice from a short sample with consent (azure-personal).
  9. Audio reasoning needs the audio itself (input_audio parts to gpt-4o-audio-preview); Realtime API uses WebRTC for clients with a backend-minted ephemeral token, WebSockets server to server.
  10. Speech SDK translation: locale source, language-code targets, event synthesis for one target only; Live Interpreter follows language switches (open range) and adds personal voice; whisper translates only into English.
0/10
Ready to start

Part 1: Which speech-to-text path fits a workload?

Real-time SDK for live audio, fast transcription for one file now, batch for stored sets, LLM Speech when a prompt shapes output.

2 min read · 10 parts, about 12 min in allStart lesson

Frequently asked questions

When should I use fast transcription instead of batch transcription?

Use fast transcription when you need the transcript of an individual file back in a single synchronous REST call within seconds, and display-form text is enough. Use batch transcription when you have large numbers of stored recordings that can be processed asynchronously as one job, when you need the lexical form of the transcript, or when you want to use a custom speech model without paying for a hosted custom endpoint.

Why doesn't my phrase list improve recognition?

Phrase lists apply only to some recognition paths. They work with real-time recognition, fast transcription, LLM Speech and the Voice Live API when the transcription model is azure-speech or MAI Transcribe (preview). They aren't available in batch transcription and have no effect in Voice Live with whisper-1 or the gpt-4o-transcribe models. For batch workloads, train a custom speech model on text that uses the terms; in Voice Live, switch input_audio_transcription to azure-speech.

How do I make a Speech SDK app use my custom speech model?

Deploy the trained model to a custom endpoint, then set endpoint_id on the SpeechConfig to that endpoint's ID. Without endpoint_id the service uses the base model for the configured locale. Batch transcription is the exception: a batch job can reference the custom model directly without a deployed endpoint. Fast transcription and LLM Speech can't use a custom speech model; they run on base models, with a phrase list as the runtime vocabulary fix.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?