SpLexicon GetWords Method (SAPI 5.4)

Speech API 5.4
Microsoft Speech API 5.4

Object: SpLexicon

GetWords Method


The GetWords method gets a list of all words in the current user and application lexicons.


SpLexicon.GetWords(
     [Flags As SpeechLexiconType = SLTUser | SLTApp],
     [GenerationID As Long = 0]
) As ISpeechLexiconWords

Parameters

Flags
[Optional] If Flags is SLTUser, user lexicon words are returned; SLTApp returns application lexicon words. By default both types of words are returned.
GenerationID
[Optional] The GenerationID. By default the value is zero.

Return Value

An ISpeechLexiconWords object, which is a collection of one or more ISpeechLexiconWord objects.


Remarks

It frequently requires several calls to GetWords to retrieve all of the words in a lexicon. From one call of GetWords to another, it is possible for the lexicon to be updated, which causes different values for GenerationID. To maintain consistency in the retrieved lexicon words, a caller of this method should use only the value of GenerationID that is passed out after the first call to GetWords.

Show: