SSML and HTML Tags Recognized by Espeak

SSML Tags

The following SSML markup tags and attributes are recognised:

<speak> (the root element)

<voice>

This element requests a change in speaking voice.

Although each attribute individually is optional, it is an error if no attributes are specified when the voice element is used.

Attributes are:

<prosody>

<say-as>

This element allows the author to indicate information on the type of text construct contained within the element and to help specify the level of detail for rendering the contained text.

Due to the variety of languages that have to be considered and because of the innate flexibility of written languages, SSML only specifies the <say-as> element, its attributes, and their purpose. It does not enumerate the possible values for the attributes.

<mark>

A mark element is an empty element that places a marker into the text/tag sequence. It has one required attribute, name, which is of type xsd:token . The mark element can be used to reference a specific location in the text/tag sequence, and can additionally be used to insert a marker into an output stream for asynchronous notification. When processing a mark element, a synthesis processor must do one or both of the following:

The mark element does not affect the speech output process.

<s>

<p>

<sub>

The sub element is employed to indicate that the text in the alias attribute value replaces the contained text for pronunciation. This allows a document to contain both a spoken and written form. The required alias attribute specifies the string to be spoken instead of the enclosed string.

Example:

<sub alias="World Wide Web Consortium">W3C</sub>

<tts:style>

<audio>

<emphasis>

<break>

HTML

eSpeak can speak HTML text directly, or text containing both SSML and HTML markup.

Any unrecognised tags are ignored.

The following tags case a sentence break.:

<br> <dd> <li> <img> <td>

The following tags case a paragraph break:

<h1> <h2> <h3> <h4> <hr>

Text between the following tags is ignored:

<script> ... </script>

<style> ... </style>