Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Customizing speech synthesis

How the voicebot turns the Speech text into a voice, which voice providers understand SSML, and the SSML tags you can use.

The voicebot reads out the Speech text of your nodes – in the Message node, turn on Split to write the speech separately from the chat text. The text goes to the voice (text-to-speech) Provider you choose when you deploy the project.

You can improve how the text sounds in two ways:

  • Write for the ear – word order, punctuation and spelling have the biggest effect on every provider. See Writing for voice.

  • Use SSML tags – pauses, speed, pitch and pronunciation, for the providers that support them (see below).

More in this section:

Which providers understand SSML

SSML (Speech Synthesis Markup Language) is a set of XML tags that control pauses, prosody and pronunciation. The platform passes the Speech text to the provider unchanged, so whether a tag works depends on the provider:

Voice provider
SSML in the Speech text

Azure

Yes. Studio wraps your text in <speak>, <voice> and <prosody> with the voice, rate and pitch of the deployment.

Google

Yes. Studio wraps your text in <speak> and splits it into sentences.

ElevenLabs, OpenAI, Cartesia, Piper

No – the text is sent as plain text. Control pauses and pronunciation with punctuation and spelling.

Azure Voice Live

No – the text is sent as plain text; voice, rate and pitch are set in the deployment.

Which providers you can choose depends on your environment.

When Studio checks the flow, it also checks the tags: <prosody>, <phoneme>, <sub> and <say-as> must have a closing tag and must not overlap, <prosody> must not be placed inside another tag, and attribute values must be in quotes.

SSML tags

There are two kinds of tags:

  • Pair tags surround the text they change: <prosody rate="slow">This sentence is slower.</prosody>

  • Self-closing tags stand alone and end with />: Hello,<break time="500ms"/>how are you?

Attributes are written inside the tag, in quotes: <prosody pitch="+10%" rate="90%">.

Inserts a pause.

Example
Meaning

<break time="500ms"/>

A pause of 500 milliseconds.

<break time="2s"/>

A pause of 2 seconds.

<break strength="strong"/>

A pause of a given strength: x-weak, weak, medium, strong, x-strong.

A full stop already makes a pause of about 200–300 ms. To make it shorter, replace the full stop with a break – a break after the full stop makes the pause longer. See Intonation and pauses.

Changes the speed, pitch or volume of the text inside.

Example
Meaning

<prosody rate="+5%">…</prosody>

5 % faster. Also x-slow, slow, medium, fast, x-fast.

<prosody pitch="+5%">…</prosody>

5 % higher. Also x-low, low, medium, high, x-high.

<prosody volume="soft">…</prosody>

Softer. Also x-soft, medium, loud, x-loud or a percentage.

<prosody contour="(0%,+10%)(50%,+50%)(100%,+10%)">…</prosody>

The pitch curve of the sentence (Azure).

With Azure, your <prosody> works inside the rate and pitch set in the deployment.

Tells the voice how to read a value.

Example
Meaning

<say-as interpret-as="digits">1234</say-as>

Digit by digit: one two three four.

<say-as interpret-as="spell" format="undefined">AB12</say-as>

Character by character.

<say-as interpret-as="date" format="dm">1/11</say-as>

A date, here day and month.

<say-as interpret-as="telephone">…</say-as>

A phone number.

Support of the formats differs by language and voice – see Numbers, dates and pronunciation.

Sets the exact pronunciation in a phonetic alphabet.

<phoneme alphabet="ipa" ph="bɔːrn ˈdɪdʒɪtəl">Born Digital</phoneme>

Reads an alias instead of the written text.

<sub alias="Born Digital">BD</sub> is read as Born Digital.

Stresses a word or phrase: <emphasis level="strong">today</emphasis>. Levels: reduced, moderate, strong. Not every voice supports it.

Example of a Speech text for an Azure or Google voice:

Tools that prepare text for speech

Some tools turn a value into a form that reads well – on every provider, because they change the text itself:

  • pronounce_number – digits separated by commas, for slow reading of numbers,

  • spell_out – a string character by character,

  • to_readable_date – a date in words (Czech and Slovak),

  • pronounce_job – the phonetic pronunciation of a job name (Czech).

Last updated

Was this helpful?