Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

lexicon Element PLS

Specifies the highest level container for an XML-format lexicon document.


   version = "1.0"
   xmlns = ""
   alphabet = “ipa” | “x-microsoft-sapi” | “x-microsoft-ups”
   xml:lang = “(language code-country/region code)”





Required. Specifies the default pronunciation alphabet to be used within the PLS document. The only acceptable values are ipa or x-microsoft-sapi or x-microsoft-ups. These values are case-sensitive and must be entered in lower case.


Required. Specifies the version number of the Pronunciation Lexicon Specification (PLS) Version 1.0 used. The only accepted value is 1.0.


Optional. Specifies a lexicon document's base Uniform Resource Identifier (URI). The value for xml:base is used to resolve relative URIs in a lexicon document. Currently, only the contents of the metadata element can potentially use relative URIs.


Required. Declares the single language for the content of the containing lexicon document. The value may contain either a lower-case, two-letter language code, (such as "en" for English or "fr" for French) or may optionally include an upper-case, country/region or other variation in addition to the language code. Examples with a county/region code include "zh-TW" for Chinese as spoken in Taiwan, or "de-DE" for German.


Required. Specifies the XML namespace for W3C pronunciation lexicon. The XML namespace is “”.


The pronunciation alphabet specified in the alphabet attribute may be overridden for a specific lexeme using the alphabet attribute of the phoneme Element PLS. You can also specify a phonetic alphabet programmatically for a speech recognition grammar, using the PhoneticAlphabet property.

See Phonetic Alphabet Reference for more information about the phonetic alphabets that System.Speech supports.

For a given language code declared in the xml:lang attribute, a speech engine that supports that language code must be installed for the lexicon to be loaded successfully.

If the xml:lang attribute specifies only a language code, and not a country/region code, (such as xml:lang="en"), then any installed speech engine that expresses support for that generic, region-independent language will be able to load the lexicon.


The following example illustrates the use of the alphabet attribute of the phoneme element to specify a pronunciation using a different phonetic alphabet than the one specified by the alphabet attribute in the lexicon element, for a single instance of the word “hello”.

<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0" 
      alphabet="ipa" xml:lang="en-US">

    <grapheme> hello </grapheme>
    <phoneme alphabet=”x-microsoft-ups”> H EH . S1 L O </phoneme>


© 2018 Microsoft