You are reading help file online using chmlib.com
|
Object: ISpeechPhraseInfo
The GetDisplayAttributes method returns the display attribute for the text.
The display attribute is the padding of white spaces before or after each word as determined by the engine. The speech recognition engine determines this value for the language used. Western scripts commonly use spaces between words, although eastern languages may not. Default is SDA_One_Trailing_Space.
ISpeechPhraseInfo.GetDisplayAttributes(
[StartElement As Long = 0],
[Elements As Long = -1],
[UseReplacements As Boolean = True]
) As SpeechDisplayAttributes
The GetDisplayAttributes method returns a SpeechDisplayAttributes variable.
In the following example, a successful recognition occurs. The variable theAttributes contains the white space attributes for the entire string. The attributes of a portion of the string could be chosen as shown in the subsequent example call. The code is inside a recognition event.
Private Sub RC_Recognition(ByVal StreamNumber As Long, ByVal StreamPosition As Variant, ByVal RecognitionType As SpeechLib.SpeechRecognitionType, ByVal Result As SpeechLib.ISpeechRecoResult)
Set RecoResult = Result
Dim theAttributes as SpeechDisplayAttributes
theAttributes = RecoResult.PhraseInfo.GetDisplayAttributes
theAttributes = RecoResult.PhraseInfo.GetDisplayAttributes( 2, 1, True )
End Sub
You are reading help file online using chmlib.com
|