You are reading help file online using chmlib.com
|
Interface: ISpeechLexiconPronunciation
The PhoneIds property returns the pronunciation of a word as a Variant array of numeric phone ids.
Pronunciations represented in PhoneIds can be converted to phones with the IdToPhone method of theSpPhoneConverter object.
Set: | (This property is read-only) |
Get: | Variant = ISpeechLexiconPronunciation.PhoneIds |
The following code snippet creates a lexicon, adds a pronunciation to it, then gets the pronunciation object, and formats the values of the PhoneIds as a string. The resulting string is " 46 12 33."
Dim objLEX As SpeechLib.SpLexicon
Dim objPRO As SpeechLib.ISpeechLexiconPronunciation
Dim colPRO As SpeechLib.ISpeechLexiconPronunciations
Set objLEX = New SpeechLib.SpLexicon
Call objLEX.AddPronunciation("one", 1033, SPSNoun, "w ah n")
'Get item(0) of the pronunciations collection
Set colPRO = objLEX.GetPronunciations("one", 1033)
Set objPRO = colPRO(0)
Dim varPhoneIds As Variant 'A Variant array of numeric values
Dim strOut As String 'Display the PhoneId values
varPhoneIds = objPRO.PhoneIds
strOut = Str(varPhoneIds(0)) & Str(varPhoneIds(1)) & Str(varPhoneIds(2))
You are reading help file online using chmlib.com
|