Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

SPGRAMMARWORDTYPE

SPGRAMMARWORDTYPE indicates the type of the word being added to a grammar. For example, is the word in display form, lexical form, or pronunciation form?

 

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>typedef enum SPGRAMMARWORDTYPE { SPWT_DISPLAY, SPWT_LEXICAL, SPWT_PRONUNCIATION, SPWT_LEXICAL_NO_SPECIAL_CHARS } SPGRAMMARWORDTYPE;</strong> </pre>

Elements

  • SPWT_DISPLAY
    Each word to be added is in display form. That is, it may have to be converted into lexical form(s). For example, the word "23" (display form) would have to converted into "twenty three" (lexical form). This is currently not implemented in the Speech Platform.
  • SPWT_LEXICAL
    Each word to be added is in lexical form and can be used to access the lexicon.
  • SPWT_PRONUNCIATION
    Each word is specified solely by its pronunciation. This is currently not implemented.
  • SPWT_LEXICAL_NO_SPECIAL_CHARS
    Switches off the handling of special characters in the grammar. For example "?" normally means wildcard, but this flag means that "?" means question mark.

Remarks

Applications building a grammar with the ISpGrammarBuilder interface use SPGRAMMARWORDTYPE when adding a word transition to a grammar with the ISpGrammarBuilder::AddWordTransition method.