Share via


token Element

  Microsoft Speech Technologies Homepage

Specifies a string that a speech recognizer can convert to a phonetic representation.

<token
    xml:lang = (en | en-US) 
    sapi:pron = string >
</token>

Attributes

  • xml:lang
    Optional. Specifies the language identifier, and optionally a country/region or other variation, for the content of the token element on which it appears. The supported language identifiers include:
    • en for English
    • en-US for U.S. English
  • sapi:pron
    Optional. Specifies a custom pronunciation using SAPI phonemes. When specified, the token element can contain only one word. The phonemes in the specified phoneme string must be space-delimited. If the phonemes are not space-delimited, or if the specified string contains an unrecognized phoneme, the recognition engine will not recognize the specified pronunciation as a valid pronunciation of the word contained by the token element.

Remarks

If the user input matches the contained words, any contained tag elements are interpreted to assign values to field item variables. token elements must not be empty.

For speech recognition, a token is typically an orthographic entity of the language being recognized. For example, although the city name San Francisco consists of two character strings separated by a space, English speakers recognize the name as a single entity. However, a token element can contain any string that the speech recognizer can convert to a phonetic representation.

Token element content can include unmarked text within a rule definition, except phrases in example elements or content in tag elements. The unmarked text is delimited by any syntactic construct of the grammar form. For each token content span in a grammar, the grammar processor applies the following processes: tokenization, white space normalization, token normalization, and pronunciation lookup .

See Also

Grammar XML | item Element | rule Element | xml:lang Attribute