How do I customize details in text-to-speech speaks?

When you create speaks with text-to-speech, you have the option to customize the speak using SSML codes. Here are the most common ones.

NOTE: To use SSML codes, SSML must be activated. You do this by starting the text with <speak> and ending with </speak>

Pause

Insert a pause in the reading.

Example:
Welcome to Flexfone's touch-tone menu. [pause for 2 seconds]

Press 1 to reach Customer Service [pause for 2 seconds]

Press 2 to reach Support [pause for 3 seconds]

Press 3 to reach Billing Service [pause for 3 seconds]

Press 0 to hear the menu again [pause for 10 seconds]

Code:

<speak>

Welcome to Flexfone's touch-tone menu <break time="2s"/>

Press 1 to reach Customer Service <break time="2s"/>

Press 2 to reach Support <break time="3s"/>

Press 3 to reach Billing Service <break time="3s"/>

Press 0 to hear the menu again <break time="10s"/>

</speak>

Change of Language

Switch the language in the speak so that the text is read in the same voice, but in another language.

Example:

Velkommen til Flexfone. Vent venligst. 

Welcome to Flexfone. Please press 9 for English.

Code:

<speak> 

Welcome to Flexfone. Please wait. <break time="1s"/>

<lang xml:lang="en-US">Welcome to Flexfone. Please press 9 for English.</lang>

</speak> 

Language and Voice Change

Switch the language in the speak so that the text is read with a different voice and in another language.

Example:

Velkommen til Flexfone. Vent venligst. (Danish voice)

Welcome to Flexfone. Please press 9 for English. (English voice)

Code:

<speak>  

Velkommen til Flexfone. Vent venligst. 

<voice xml:lang="en-US" name="en-US-Wavenet-C"> Welcome to Flexfone. Please press 9 for English </voice>  

</speak> 

Spell the Word

Have the voice pronounce the letters instead of saying the word.

Example:

Welcome to ABCDE Brokers. Please wait.

Code:

<speak> 

Welcome to <say-as interpret-as="characters">ABCDE</say-as> Brokers. Please wait.

</speak>

Comprehensive Example

Example:

Velkommen til ABCDE Mæglerne. 

Tast 1, hvis du er interesseret i at købe 

Tast 2, hvis du overvejer at sælge 

Tast 3, hvis du ønsker at tale med bogholderiet 

Tast 0, for at høre menuen igen 

Please press 9 for English. 

Code:

<speak>  

Velkommen til <say-as interpret-as="characters">ABCDE</say-as> mæglerne<break time="2s"/>  

Tast 1 hvis du er interesseret i at købe <break time="2s"/>  

Tast 2 hvis du overvejer at sælge <break time="2s"/>  

Tast 3 hvis du ønsker at tale med bogholderiet <break time="2s"/>  

Tast 0 for at høre menuen igen <break time="2s"/> 

<voice xml:lang="en-US" name="en-US-Wavenet-C"> Please press 9 for English  </voice> <break time="5s"/> 

</speak>

If you want more SSML codes, you can find them here.