lexeme Element (Microsoft.Speech)

Microsoft Speech Platform SDK 11

Collapse image Expand Image Copy image CopyHover image

Contains one or more written representations of a word, one or more pronunciations of the word, and may include an example usage of the word in a sentence.

Syntax

XML Copy imageCopy Code
<lexeme
    xml:id = string
<lexeme/>

Attributes

Attribute

Description

xml:id

Optional. Allows the lexeme to be referenced from other documents.

Remarks

The lexeme element contains one or more grapheme elements, one or more pronunciations (each contained in a separate phoneme element), and zero or more example elements. All the pronunciations given within a lexeme apply to each and every grapheme within the lexeme.

The children of the lexeme element may appear in any order, but note that the order in which the pronunciations are listed may determine which pronunciation a speech synthesis engine selects. See phoneme Element PLS (Microsoft.Speech).

Example

This example contains a pronunciation for the grapheme "lead", specified in the phoneme element, and a sample usage of a pronunciation given in the example element. The pronunciation given in the phoneme element uses phones from Microsoft's Universal Phone Set (UPS), which is specified in the alphabet attribute of the lexicon element.

XML Copy imageCopy Code
<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0" 
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon 
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="x-microsoft-ups" xml:lang="en-US">

  <lexeme>
    <grapheme> lead </grapheme>
    <phoneme> S1 L EH D </phoneme>
    <example> My feet were as heavy as lead </example>
  </lexeme>

</lexicon>

See Also