This feature enables support for word IDs (the !id directive) in grammar files. When a term has a word ID assigned in the grammar file, the engine will return a number (converted to a string) rather than the speech result, which can be useful for localization.
For example, if the grammar file specified:
abort !id(4)
then when the user said "abort," the engine would return "4".
Possible Values
0 | Ignores !id directives in grammar files. |
1 | Returns the word ID (a number) specified in the grammar for a term. |
The default value is 1.
Example
Script( word_ids_example )
Number( nUseWordIds )
Activate( From_Menu )
nUseWordIds = Speech_Get_Setting( "stt_use_word_ids" )
If( Number_Equal( nUseWordIds, 1 ) )
Message( "!id values in grammars will be used.", 5 )
Else
Message( "!id values in grammars will be ignored.", 5 )
End_If
Return
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other