# <lexicon>

Description

An SSML document may reference one or more external pronunciation lexicon documents. A lexicon document contains pronunciation information for words/phrases that can appear in the text to be spoken in the SSML document. Lexicon documents are sometimes called "dictionaries".

Currently, there is no standard format supported for lexicon documents. The proprietary formats that are supported, and the pronunciation handling of the documents, are specific to each synthesis processor. See your vendor documentation for details.

Note: A `<lexicon>` element exists as well for grammars.

Syntax

    <lexicon
        uri="URI"
        type="MIME_type"/>

Attributes

Attribute | Description
uri | The URI of the pronunciation lexicon document. Required.
type | The MIME type of the pronunciation lexicon document. The supported types (and default values) for this attribute depend on the TTS engine being used. Optional.

Parents

<audio>, <choice>, <enumerate>, <foreach>, <prompt>, <speak>

Children

None.

Limitations/Restrictions

- When multiple lexicons are referenced, their precedence goes from lower to higher with document order. Precedence means that a word/phrase is first looked up in the lexicon with highest precedence. Only if not found in that lexicon, the next lexicon is searched and so on until a first match or until all lexicons have been used for lookup.
- All `<lexicon>` elements must occur at the beginning of the SSML content.
- `<lexicon>` is only supported as a child of `<foreach>` when `<foreach>` is used within `<prompt>`.
- Refer to your vendor documentation for support details.

Example

To include speech markup tags, insert the SSML tags inside one of the `<prompt>`, `<audio>`, `<choice>`, `<enumerate>`, or `<foreach>` (within `<prompt>`) elements.

    <prompt>
      <lexicon uri="http://www.example.com/lexicon.xml"/>
      Hello, world!
    </prompt>