<aztts> · Azure Speech · SSML · part of tts
aztts
aztts speaks text with Azure Speech. It is the tts core fixed to Azure, with the same daemon, queue, mute and remote protocol. It turns plain text into SSML, escaping it with the ssml library and wrapping it in the voice, style and prosody you ask for; --print-ssml shows the document it would send, without a credential or a network call.
aztts 'Hello' # MAI-Voice-2.1-Flash, en-GB, to the speakers
aztts -f mp3 -o greeting.mp3 'Hello'
ssml --model MAI-Voice-2.1 --voice en-US-Iris 'Hi' | aztts --ssml
aztts --remote studio --pan 1 'From the right'
The document it sends
aztts --print-ssml --voice en-US-Iris:MAI-Voice-2.1 --style cheerful --degree 1.2 --speed .9 'Good morning.'
<speak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts' xml:lang='en-GB'><voice name='en-US-Iris:MAI-Voice-2.1'><lang xml:lang='en-GB'><mstts:express-as style='cheerful' styledegree='1.20'><prosody rate='-10.00%' pitch='+0.00%' volume='100.00'>Good morning.</prosody></mstts:express-as></lang></voice></speak>
--voice names the voice, --style and --degree become an express-as, --speed .9 a rate of −10%; the text is escaped, never interpreted.- Voices. MAI-Voice-2.1-Flash by default, MAI-Voice-2.1 for HD (the aliases
azure-ttsandazure-tts-hdmap to them), and the older 2 families on request. A named MAI voice becomesname:model; a qualified persona is never rewritten. - Speaker embeddings. A voice can be a speaker profile instead of a name, when the key is authorised for it. A named voice clears a lower-priority embedding rather than keeping it by accident.
- Delivery. Speed 0.5–3, pitch −50 to +50%, volume 0–100, a style with a degree from 0.01 to 2, and a role, which needs a style.
--style noneclears an inherited one. - Your own SSML.
--ssmltakes one completespeakdocument (DTDs are rejected), and--configa saved Speech JSON profile instead of flags; mutually exclusive flags are refused, not ignored.
Authentication
Resources with keys use AZURE_SPEECH_API_KEY, read only at generation and never accepted as an argument or a config field. Resources with local authentication switched off use Microsoft Entra: a broker command fetches a token, and from then on it is handled with care.
Output
Audio is 16-bit 24 kHz mono PCM by default, or WAV, or 48 kbps MP3. Raw and file output never play; files are replaced atomically, through managed symlinks, and a failure leaves the old file untouched. There is no cache and no automatic billed retry. Arguments form one utterance; otherwise each non-empty line of stdin is one. Everything else, from the daemon and its FIFO playback to cancellation, panning and mute, is the tts core's.