Two translation services in Foundry
LLMs can generate output in many languages and do basic translation, but comprehensive, production-grade solutions want purpose-built models. Foundry offers two, both reached through the resource endpoint.
| Service | What it does |
|---|---|
| Azure Translator in Foundry Tools | Comprehensive text translation — a wide range of languages, plus custom translation models. |
| Azure Speech in Foundry Tools | Speech translation — speech-to-text and speech-to-speech, across multiple languages at once. |
Text and documents, 90+ languages
Azure Translator translates text between 90+ languages via API. Its capabilities: text translation (default or LLM-based models), document translation (sync or async, preserving structure), custom models for domain terminology, and transliteration (converting between scripts, e.g. Hiragana → Latin).
Key concept · Calling the Translator
Authenticate a TextTranslationClient with an AzureKeyCredential and the Foundry endpoint (or a region). Key methods: get supported languages (137+ languages with names/ISO codes), translate text (a list of InputTextItem; the from_language is optional — it auto-detects — and you can target several languages at once, getting back the detected source plus each translation), and transliterate (using from_script and to_script, e.g. "Jpan"→"Latn"). The portal has playgrounds to compare the default model against LLM results and to generate client code.
Spoken input, spoken output
Azure Speech translation uses a SpeechTranslationConfig — set speech_recognition_language for the source and add_target_language() for each target — with an AudioConfig (e.g. the microphone). A TranslationRecognizer then translates spoken input into text for every target language at once.
Key concept · Two ways to get spoken output
Manual synthesis — translate to text with the TranslationRecognizer, then synthesize each translation with a SpeechSynthesizer and language-specific voices; the flexible choice for multi-language output. Event-based synthesis — set voice_name on the config and handle the recognizer's synthesizing event to read evt.result.audio directly; simpler, but limited to 1:1 (single source → single target). Both let you pick neural voices for natural pronunciation.
Chapter 22 quiz
Fourteen questions on service choice, Azure Translator, and speech translation. Answer first, then expand Show answer.
Part A · Multiple choice
Which service handles comprehensive text and document translation?
- A Azure Translator in Foundry Tools
- B Azure Speech in Foundry Tools
- C Azure Language
- D Sora
Show answer
A — Azure Translator. Speech handles spoken translation.
Roughly how many languages does Azure Translator support?
- A 5
- B 90+
- C Exactly 12
- D 1,000+
Show answer
B — 90+. (The supported-languages call lists 137+ entries.)
What is transliteration?
- A Converting text between scripts (e.g. Hiragana → Latin)
- B Translating speech to text
- C Summarizing a document
- D Detecting PII
Show answer
A. Using from_script and to_script.
If you omit from_language when translating text, what happens?
- A The source language is auto-detected
- B The call fails
- C It defaults to English
- D It returns the input unchanged
Show answer
A. The response also reports the detected source.
Which object configures source and target languages for speech translation?
- A SpeechTranslationConfig
- B TextTranslationClient
- C MCPTool
- D AIProjectClient
Show answer
A. speech_recognition_language + add_target_language().
Which synthesis approach supports multi-language spoken output?
- A Manual synthesis (TranslationRecognizer → SpeechSynthesizer)
- B Event-based synthesis
- C Neither
- D Both equally
Show answer
A. Event-based synthesis is limited to 1:1.
Part B · True or false
General LLMs are the recommended tool for production-grade, multi-language translation.
Show answer
False. Specialized services (Translator, Speech) are designed for that.
Document translation can preserve the document's structure.
Show answer
True. Sync or async, maintaining structure.
A TranslationRecognizer can translate spoken input into several target languages at once.
Show answer
True. Add multiple target languages to the config.
Event-based speech synthesis works for many target languages simultaneously.
Show answer
False. It's for 1:1 (single source → single target) only.
Azure Translator supports custom, domain-specific translation models.
Show answer
True. For specialized terminology.
Part C · Short answer
Name the four capabilities of Azure Translator.
Show answer
Text translation, document translation, custom models, and transliteration.
Which credential and client translate text in code?
Show answer
AzureKeyCredential with a TextTranslationClient (Foundry endpoint or region).
In event-based synthesis, how do you retrieve the translated audio?
Show answer
Set voice_name, handle the recognizer's synthesizing event, and read evt.result.audio.