ISpSREngine::WordNotify (SAPI 5.3)
Microsoft Speech API 5.3
ISpSREngine::WordNotify
ISpSREngine::WordNotify notifies the SR engine when words in command and control grammars are being added or removed.
HRESULT WordNotify(SPCFGNOTIFY Action,
ULONG cWords,
const SPWORDENTRY * pWords
);
Parameters
- Action
The SPCFGNOTIFY enumeration value specifying which action, add or delete, is occurring. This will either be SPCFGN_ADD when words are added, or SPCFGN_REMOVE when they are deleted. - cWords
The number of words contained in pWords. - pWords
Array of SPWORDENTRY structures containing information on each word.
Return values
Value |
S_OK |
SPERR_NO_WORD_PRONUNCIATION |
FAILED(hr) |
Remarks
This method is called by SAPI when words are added or removed when the application loads, unloads, or modifies grammars. SAPI internally keeps a reference count and each word will be added only if it is not already present in any existing grammar.