SSML Reference
Speech Synthesis Markup Language (SSML)
There are a variety of SSML tags supported.
Tag | Description |
<emphasis> | Place emphasis on words |
<break> | Add a pause by specifying time or strength |
<p> | Paragraph pausing |
<s> | Sentence pausing |
<say-as> | Better interpretation for part of speech |
<lang> | Specify another language for word or phrase |
<sub> | Substitute a different word |
<phoneme> | Phonetic pronunciation |
<prosody> | Volume, pitch and speaking rate |
<speak> | Root element for TTS |
Example
Below is an example:
<speak> Here are <say-as interpret-as="characters">SSML</say-as> samples. I can place emphasis on words, like <emphasis level="strong">wow!</emphasis>. I can pause <break time="3s"/>. I can speak different languages. <lang xml:lang="fr-FR">Je ne parle pas français.</lang> I can speak in cardinals. Your number is <say-as interpret-as="cardinal">10</say-as>. Or I can speak in ordinals. You are <say-as interpret-as="ordinal">10</say-as> in line. Or I can even speak in digits. The digits for ten are<say-as interpret-as="characters">10</say-as>. I can also substitute phrases, like the <sub alias="World Wide Web Consortium">W3C</sub>. I can make different pronunciations. You say, <phoneme alphabet="ipa" ph="pɪˈkɑːn">pecan</phoneme>. I say, <phoneme alphabet="ipa" ph="ˈpi.kæn">pecan</phoneme>. I can speak a paragraph with two sentences. <p> <s>This is sentence one.</s> <s>This is sentence two.</s> </p> Finally, I can change volume, rate, or pitch. Such as <prosody volume="x-soft">decreasing the volume</prosody>, or <prosody rate="fast">speed up the speaking rate of your text</prosody>, or <prosody pitch="x-high">speak with a higher pitch</prosody>. </speak>