Export (0) Print
Expand All

ISpSREngine::WordNotify (SAPI 5.3)

Speech API 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

ValueDescription
S_OKFunction completed successfully.
SPERR_NO_WORD_PRONUNCIATIONThe engine could not generate a pronunciation for some of the words added.
FAILED(hr)Other appropriate error message.

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.

Show:
© 2015 Microsoft