SpLexicon GetWords Method (SAPI 5.4)
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
- [Optional] If Flags is SLTUser, user lexicon words are returned; SLTApp returns application lexicon words. By default both types of words are returned.
- [Optional] The GenerationID. By default the value is zero.
An ISpeechLexiconWords object, which is a collection of one or more ISpeechLexiconWord objects.
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.