SpLexicon GetPronunciations Method (SAPI 5.4)

Microsoft Speech API 5.4

Object: SpLexicon

GetPronunciations Method

The GetPronunciations method gets the pronunciations and parts of speech for a word from the user and application lexicons.

An ISpeechLexiconPronunciation object contains a word's pronunciations, part of speech and phone ids. Because a word may have more than one pronunciation and more than one part of speech, the GetPronunciations method returns a collection of these objects.

  
    SpLexicon.GetPronunciations(
     bstrWord As String,
     [LangId As Long = 0],
     [TypeFlags As SpeechLexiconType = SLTUser | SLTApp]
) As ISpeechLexiconPronunciations

Parameters

  • bstrWord
    The target lexicon word.
  • LangId
    [Optional] The language Id. By default the value is zero which indicates the system LangId is used.
  • TypeFlags
    [Optional] TypeFlags.

Return Value

An ISpeechLexiconPronunciations object, which is a collection of one or more ISpeechLexiconPronunciation objects.