SSML features in Voicer WordPress plugin

In this article, you can learn more about SSML features in Voicer WordPress plugin. Starting with version 2.0.0, the Voicer plugin supports Speech Synthesis Markup Language(SSML) in WordPress plugin. SSML is part of a larger set of markup specifications for voice browsers developed through the open processes of the W3C.

Notes

This manual was created for Voicer version 2.0.0 and higher.Learn more about the basic plugin settings from the Settings guide for Voicer 2.0 WordPress plugin.

You can fine-tune for the following entities:

SSML is possible by using shortcodes inside the WordPress page. A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line.

Pause

To create a pause in speech synthesis, use the following shortcode:

[voicer-break time="2s" strength="medium"]
This example is spoken “One… Two”

Time sets the length of the break by seconds or milliseconds (e.g. “3s” or “250ms“).

The Strength sets the strength of the output’s prosodic break by relative terms. Valid values are: “x-weak“, weak“, “medium“, “strong“, and “x-strong“. The value “none” indicates that no prosodic break boundary should be outputted, which can be used to prevent a prosodic break that the processor would otherwise produce. The other values indicate monotonically non-decreasing (conceptually increasing) break strength between tokens. The stronger boundaries are typically accompanied by pauses.

[voicer-break time="2s"]

You can specify only the length of the pause. In this case, the Strength parameter value will be set to default.

Mute

You can turn off the spoken part of the page. Wrap it in voicer-mute shortcode to prevent this section of the page from being spoken.

[voicer-mute] ... [/voicer-mute]

You can also use classes directly in the layout of your page:

<p class="voicer-mute"> ... </p>

Sentence and paragraph

The Voicer supports paragraph markup like part default SSML in the WordPress plugin. The plugin will automatically intonate and make short pauses at the end of sentences and paragraphs. It is necessary to end the sentence with one of the punctuation marks corresponding to the end of the sentence.

Use one of the punctuation marks to complete the sentence:

  • .
  • !
  • ?

Voice-off

Since version 3.0.3 a new [voicer-off] shortcode and "voicer-off" class are available, which disable the Text-to-Speech feature of the current page. The shortcode doesn’t have a closing tag, just add it anywhere on the page.

[voicer-off]

You can also use classes directly in the layout of your page:

<p class="voicer-off"> ... </p>

The shortcode/class differs from the shortcode [voicer-mute] in that this allows you to turn off the voicing of the entire page and read only certain blocks on the page using the shortcode [voicer-voice].

Voice-voice

Since version 3.0.3 a new shortcode and class are available, which allows you to voice the text blocks with different languages and voices.

Below is the shortcode example that can be used only with the voice attribute. Find out the name of the voice and listen to samples of all the votes on the Google Cloud website.

[voicer-voice voice="en-GB-Wavenet-A"] Hello! [/voicer-voice]

You can also use classes directly in the layout of your page:

<p class="voicer-voice-en-US-WaveNet-H"> ... </p>

The shortcode/class allows making your page multilingual.

Please note: if different languages are specified for several text blocks in a row and both of them are highlighted to apply the Text-to-Speech feature, only one block in one language will be voiced, since the plugin does not provide for gluing text.

About compatibility of the SSML features in the Voicer WordPress plugin

You can combine and use several Voicer shortcodes in one place on the page as well as use multiple shortcodes on the page.
You can also use most of the native SSML in the WordPress plugin inside the markup of your pages. Valid markup will be converted to speech by Voicer.

Was this article helpful to you?