TTS Synthesis Markup Language
With the help of Speech Synthesis Markup Language (SSML), you can make your TTS responses seem more like natural speech. In the following Article you will find some examples of how to use it (applicable for both dynamic and static TTS).
The full List of SSML elements may be helpful for additional context and examples:
Created: May 2020
Permalink: https://wildix.atlassian.net/wiki/x/YwLOAQ
Do not use <speak> element as it is already hardcoded.
<break>
An optional element that you can use to insert pauses between words.
Attributes
Attribute | Description |
|---|---|
strength | Optional. Specify the relative duration of a pause using one of the following values:
|
time | Optional. Specify the absolute duration of a pause in seconds or milliseconds. Example: 2s and 500ms |
Syntax
<break />
<break strength="string" />
<break time="string" />Usage
Play sound -> Welcome to Wildix <break time="2s"/> Please wait for the next available operator
Example:
<prosody>
An optional element that specifies the pitch, contour, range, rate, duration, and volume for speaking the element's text.
Attributes
Attribute | Description |
|---|---|
pitch | Optional. Indicates the baseline pitch for the text. You may express the pitch as:
|
contour | Optional. Represents changes in pitch for speech content as an array of targets at specified time positions in the speech output. Each target is defined by sets of parameter pairs. For example: |
range | Optional. A value that represents the range of pitch for the text. You may express |
rate | Optional. Indicates the speaking rate of the text. You may express
|
duration | Optional. The period of time that should elapse while the TTS engine reads the text, in seconds or milliseconds. For example, 2s or 1800ms. |
volume | Optional. Indicates the volume level of the speaking voice. You may express the volume as:
|