ISpeechPhraseReplacement Interface

Microsoft Speech SDK

Intelligent Interface Technologies Home Page Microsoft Speech SDK

Speech Automation 5.1

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:


Properties Description
DisplayAttributes Property Returns a set of SpeechDisplayAttributes constants specifying information about the display of this word.
FirstElement Property Returns the offset of the first spoken element to be replaced.
NumberOfElements Property Returns the number of spoken elements to replaced.
Text Property Returns the text of the replacement.