ISpeechPhraseInfo GetDisplayAttributes Method (SAPI 5.3)
Microsoft Speech API 5.3
Object: ISpeechPhraseInfo
GetDisplayAttributes Method
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
Parameters
- StartElement
[Optional] Specifies the word position from which to start. If omitted, the first word is used. - Elements
[Optional] Specifies the number of words retrieve to determine spacing. Default value is -1 indicating all words are retrieved. - UseReplacements
[Optional] Indicates if replacement text should be used. An example of a text replacement is speaking the sentence "write new check for twenty dollars." The retrieved replacement text is "write new check for $20." Default value is True. For more information on replacements, see the SR Engine White Paper.
Return Value
The GetDisplayAttributes method returns a SpeechDisplayAttributes variable.
Example
Use of the ISpeechPhraseInfo object is demonstrated in a code example at the end of this section.