Export (0) Print
Expand All

ISpeechPhraseReplacement Interface (SAPI 5.4)

Speech API 5.4
Microsoft Speech API 5.4

ISpeechPhraseReplacement

The ISpeechPhraseReplacement automation interface specifies a replacement, or text normalization, of one or more spoken words in a recognition result.

For example, the spoken words "twenty three" might be replaced by the replacement text "23."

Recognition results are returned in an ISpeechRecoResult, which contains an ISpeechPhraseInfo object. The ISpeechPhraseInfo has two properties which are closely related. Its Elements property is a collection of ISpeechPhraseElement objects; its Replacements property is a collection of ISpeechPhraseReplacement objects. An ISpeechPhraseReplacement object is related to and dependent on the phrase elements in the recognition result which contains it.

Use of the ISpeechPhraseReplacement is demonstrated in a code example at the end of this section.

Automation Interface Elements

The ISpeechPhraseReplacement automation interface contains the following elements:


PropertiesDescription
DisplayAttributes PropertyReturns a set of SpeechDisplayAttributes constants specifying information about the display of this word.
FirstElement PropertyReturns the offset of the first spoken element to be replaced.
NumberOfElements PropertyReturns the number of spoken elements to replaced.
Text PropertyReturns the text of the replacement.
Show:
© 2014 Microsoft