Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

6.2.3. SSML (Speech Synthesis Markup Language)

SSML gives you fine-grained control over speech synthesis. The following elements are frequently tested.

🔧 SSML Elements:
ElementPurposeKey Attributes
<prosody>Rate, pitch, volumerate, pitch, volume
<break>Pausestime="500ms", strength="strong"
<emphasis>Stress wordslevel="strong|moderate|reduced"
<say-as>Pronunciation hintsinterpret-as="date|time|telephone|cardinal"
<phoneme>Exact pronunciationalphabet="ipa", ph="..."
<mstts:express-as>Speaking stylestyle="cheerful|sad|angry"
SSML Template:
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" 
       xmlns:mstts="https://www.w3.org/2001/mstts" xml:lang="en-US">
    <voice name="en-US-JennyNeural">
        <mstts:express-as style="cheerful">
            Welcome!
        </mstts:express-as>
        <break time="500ms"/>
        <prosody rate="slow" pitch="-5%">
            Please listen carefully.
        </prosody>
        Your code is <say-as interpret-as="characters">ABC123</say-as>.
    </voice>
</speak>
Using SSML:
result = synthesizer.speak_ssml_async(ssml_string).get()
Alvin Varughese
Written byAlvin Varughese
Founder•15 professional certifications