infrastructure//Azure//Speech

Speech is the Azure service for voice: speech to text, speech translation and text-to-speech behind one resource and one key. Microsoft has renamed it more than once (Azure AI Speech, now Azure Speech in Foundry Tools), so documentation and forum answers use all the names. Its text-to-speech side takes SSML and returns an audio file, read by a catalogue of prebuilt neural voices in more than 100 languages and locales, each named after its locale (`zh-CN-YunyangNeural` is the one that voices my Mandarin deck).


Speech is the Azure service for voice: speech to text, speech translation and text-to-speech behind one resource and one key. Microsoft has renamed it more than once (Azure AI Speech, now Azure Speech in Foundry Tools), so documentation and forum answers use all the names. Its text-to-speech side takes SSML and returns an audio file, read by a catalogue of prebuilt neural voices in more than 100 languages and locales, each named after its locale (zh-CN-YunyangNeural is the one that voices my Mandarin deck).

The request is SSML. The service follows W3C SSML 1.0 and adds its own mstts: elements. prosody rate takes a multiplier or a percentage within 0.5 to 2 times the default, so a sentence read at 70% is rate="0.7"; break inserts a pause anywhere in the text; mstts:silence with type Leading adds silence before the first word, the lead-in for players that swallow the first syllable.

Billing counts every character of each successful request, spaces, punctuation and the SSML markup included (the speak and voice tags excepted), and each Chinese character counts as two. The free tier (F0) gives 0.5 million characters a month of neural voices at 20 requests per minute; the standard tier (S0) is pay as you go (Microsoft's quota guide estimates at $15 per million characters), 30 requests per second by default. With a hash-named cache, a deck pays for each distinct string once.

The tier also bounds what the audio may be used for. The Product Terms, as quoted by Microsoft's moderators on Microsoft Q&A, grant the right to use the output of prebuilt neural voices, commercially included, to customers of the paid tier only, which leaves F0 output without that grant. Audio meant to be published should come from an S0 resource; the current Product Terms are the authority.

Getting a key: in the Azure portal, create a Speech resource inside a resource group, choosing its region and pricing tier. The resource's Keys and Endpoint page then shows two keys, the region and the endpoint. The SDK needs a key plus the endpoint or the region, usually read from environment variables (SPEECH_KEY, SPEECH_REGION); the REST call posts the SSML to https://<region>.tts.speech.microsoft.com/cognitiveservices/v1 with the key in the Ocp-Apim-Subscription-Key header.

Speech is often confused with Azure AI Translator, a separate service that turns text in one language into text in another. Only Speech produces audio, and its own speech translation is the path that starts from audio.