Last reviewed: 3/23/2024 8:46:15 AM
In this article
<lexicon>
A <lexicon> element serves as a reference to a document of pronunciations. The pronunciation information contained within a lexicon is used for tokens appearing within the referencing document. Any number of lexicon elements may occur as immediate children of the <grammar> element.
Syntax
<lexicon type="mediaencodingtype"
uri="uri" />
Attributes
type
Optional. Specifies the media type of the pronunciation lexicon document.
uri
The URI of the lexicon document.
Children
none
Parents
Example
The following example illustrates using lexicon elements.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE grammar PUBLIC "-//W3C//DTD GRAMMAR 1.0//EN" "http://www.w3.org/TR/speech-grammar/grammar.dtd">
<grammar xmlns="http://www.w3.org/2001/06/grammar"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
xml:lang="En" version="1.0" mode="voice" >
<lexicon uri="http://www.example.com/lexicon.file"/>
<lexicon uri="http://www.example.com/strange-city-names.file" type="text/plain"/>
</grammar>