ISpeechPhraseInfo GetText Method (SAPI 5.3)
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
- [Optional] Specifies the word position from which to start. If omitted, the first word is used.
- [Optional] Specifies the number of words to retrieve. Default value is -1 indicating all words are retrieved.
- [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.
The GetText method returns a String containing the words in the phrase.
Use of the ISpeechPhraseInfo object is demonstrated in a code example at the end of this section.