CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


Intelligent Interface Technologies Home Page Microsoft Speech SDK

Speech Automation 5.1

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

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

If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web