Skip to main content
SSML (Speech Synthesis Markup Language) is an XML-based markup that gives developers precise control over how text is converted to speech. With SSML you can shape tone, pacing, pronunciation, and other delivery aspects so synthesized audio sounds more natural and expressive.
A presentation slide titled "Speech Synthesis Markup Language (SSML)" with an icon of a document being converted into a speech bubble. The caption explains SSML is a markup language for fine‑tuned customization of how text is converted to speech.
Core SSML capabilities
  • Speaking styles — set the voice’s tone or emotion (for example: cheerful, excited, empathetic).
  • Pauses and silence — insert breaks or delays to control pacing and rhythm.
  • Phonemes — define custom pronunciations for technical terms, names, or nonstandard words.
An infographic slide titled "Speech Synthesis Markup Language (SSML)" showing three panels: 01 Speaking Styles (modify tone and emotion), 02 Pauses and Silence (control timing and pacing), and 03 Phonemes (define custom pronunciations). Each panel includes a simple icon and brief explanatory text.
Additional expressive features
  • Prosody adjustments — change pitch, rate, and volume to create a more dynamic delivery.
  • Say-as formatting — control how numbers, dates, times, phone numbers, and other tokens are spoken (for example, as a year, ordinal, or telephone number).
  • Embedded audio — insert pre-recorded audio or background music for branding or effects.
A presentation slide titled "Speech Synthesis Markup Language (SSML)" showing three numbered feature cards: Prosody Adjustments, "Say-as" Formatting, and Embedded Audio with short descriptions. Each card lists what the feature does (modify pitch/rate/volume; specify how numbers/dates/times are spoken; insert background or recorded audio).
Common SSML tags and when to use them Example SSML — C# string literal This C# example shows two voices with different behaviors, using expressive styles, phonemes, and a pause:
This snippet demonstrates:
  • mstts:express-as — apply emotional/speaking styles (provider-specific).
  • phoneme — use IPA to precise pronunciation.
  • break — insert a pause for natural pacing.
Authoring and previewing SSML in Speech Studio You can author and preview SSML directly in the browser with Azure Speech Studio. The UI helps configure voice selection, pronunciation rules, rate, pitch, and volume, then lets you export the resulting SSML for programmatic use.
A screenshot of the Azure AI Speech Studio web page showing feature tiles for speech-to-text and related services (Real-time speech-to-text, Whisper Model, Batch speech-to-text, Custom Speech, Pronunciation Assessment, and Speech Translation). The page includes a top navigation bar and a user profile icon in the upper right.
Speech Studio’s real-time preview functionality is supported in Edge and Chrome. If you use other browsers (for example, Opera), some preview features may not work as expected.
When you export SSML from Speech Studio you may see metadata comments followed by the SSML itself. Example exported SSML with metadata:
SSML from code — Python example using the Azure Speech SDK When synthesizing SSML programmatically with the Azure Speech SDK, call the SSML-specific method (for example, speak_ssml_async) instead of plain-text APIs. The Python example below demonstrates creating a SpeechSynthesizer and synthesizing expressive SSML:
Sample run
Implementation notes and best practices
  • Use express-as (or provider-specific equivalents) to apply emotional or speaking styles (cheerful, excited, empathetic, etc.).
  • Use prosody to fine-tune rate, pitch, and volume. Negative rate values slow speech; positive values speed it up.
  • Use break to add pauses for natural pacing.
  • Use phoneme tags to force correct pronunciations for technical terms and names.
  • Export SSML from Speech Studio to iterate quickly in the UI, then integrate the SSML into your application code.
  • Always test SSML playback on target platforms and browsers, as preview features and supported styles may vary.
Tip: When programmatically synthesizing SSML, prefer SSML-specific synthesis methods (for example, speak_ssml_async in the Azure Speech SDK) to ensure the markup is interpreted correctly.
Conclusion SSML enables precise control over voice, timing, pronunciation, and emotion, helping you craft natural, expressive speech for accessibility, conversational interfaces, voice-enabled apps, and branded audio experiences. You can author SSML in code, export it from Azure Speech Studio, or use the SDKs to synthesize SSML directly in your application. Links and references Now that you know how to convert text to speech and enhance it with SSML, begin applying these techniques to build conversational and accessible experiences in your applications.

Watch Video