SSML Tag Support
  • 24 Oct 2023
  • 2 Minutes to read
  • Contributors
  • PDF

SSML Tag Support

  • PDF

Article summary

We offer our customers the ability to use Speech Synthesis Markup Language (SSML) tags with our Text-to-Speech technology. SSML tags allow businesses to customize the pronunciation, intonation, and emphasis of their audio content, creating a more engaging and personalized experience for the listener. Our support for the most commonly used SSML tags, including break, say as, and even insert audio files, all with just a few lines of code.

SUPPORTED SSML TAGS

Speak

This is the root element for SSML document. You can use this tag by adding it at the beginning and the end of a text:

<speak>
Welcome to Sestek text to speech program.
</speak>

Audio

Insert pre-recorded audio elements into the TTS generated audio with this tag. To use this tag, you must specify the file location of the audio file you want to insert:

<speak>
Welcome to Sestek text to speech program.
<audio src=”https://www.sestek.com/audio/welcome-music.wav” />
Please enter the text you want to be synthesized. 
</speak>

The example will sound like below:
Sestek TTS: Welcome to Sestek text to speech program
(the specified welcome-music.wav audio file plays)

Sestek TTS: Please enter the text you want to be synthesized
In case the audio file cannot be found in the specified path, you can also write the text to be synthesized. If audio file is missing, Sestek TTS will synthesize the text:

<speak>
Welcome to Sestek text to speech program.
<audio src=”https://www.sestek.com/audio/welcome-music.wav”>you are being directed </audio>
Please enter the text you want to be synthesized. 
</speak>

Break

You can insert pauses in the speech with this tag. Break element has two optional attributes:

AttributeValues
strengthnone, x-weak, weak, medium (default value,) strong, x-strong
timeduration of the pause in seconds or milliseconds
<speak>
Please press 9 for help <break time=”2s”/>
If you are an existing customer please press 1. <break strength=”weak”/> 
if you are not a customer please wait.
</speak>

Voice

You can change the pre-installed voices during speech with this tag. Sestek TTS has male and female voice options up to 8 different languages.

<speak>
<voice name=”GVZ Craig 16k” > Hello, I am Craig, TTS voice of Sestek.	 </voice>
<voice name=”GVZ Rae 8k” > Hello, I am Rae, another TTS voice of Sestek. </voice>
</speak>

Say-as

You can describe how a text should be interpreted with this tag. say-as tag must be used with interpret-as attribute. There is an optional attribute, format, which is used in only specific values within the “interpret-as” attribute. Available values for interpret-as are, spell-out, letters and characters.

Spell-out, letters, characters

These values spell out each letter in a given phrase.

<speak>
<say-as interpret-as="letters" > Hello </say-as>
</speak>

Format attribute must be used with characters attribute. It has a value, glphys, which spells out each letter with specifying uppercase/lowercase condition.

<speak>
<say-as interpret-as="letters" format=”glyphs” > Hello </say-as>
</speak>

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.