ISpSREngine::WordNotify (SAPI 5.3)
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 );
- 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.
- The number of words contained in pWords.
- Array of SPWORDENTRY structures containing information on each word.
|S_OK||Function completed successfully.|
|SPERR_NO_WORD_PRONUNCIATION||The engine could not generate a pronunciation for some of the words added.|
|FAILED(hr)||Other appropriate error message.|
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.