|
| 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
|
Microsoft Speech SDK
Speech Automation 5.1
Object: ISpeechPhraseInfo
GetText Method
The GetText method returns the text from a recognition as a single string.
ISpeechPhraseInfo.GetText(
[StartElement As Long = 0],
[Elements As Long = -1],
[UseReplacements As Boolean = True]
) As String
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 to retrieve. 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. See the SR Engine White Paper for more information on replacements.
Return Value
The GetText method returns a String containing the words in the phrase.
Remarks
GetText may be used only after a recognition attempt, whether successful (SRERecognition), or unsuccessful (SREFalseRecognition).
Example
In the following example, a successful recognition occurs and displays in a text box. 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
TextBox1.Text = RecoResult.PhraseInfo.GetText
End Sub