Gets a collection of the recognition alternates that have the same pronunciation as this recognized phrase.
Namespace:
Microsoft.Speech.Recognition
Assembly:
Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
Visual Basic (Declaration) |
---|
Public ReadOnly Property Homophones As ReadOnlyCollection(Of RecognizedPhrase) Get |
Visual Basic (Usage) |
---|
Dim instance As RecognizedPhrase Dim value As ReadOnlyCollection(Of RecognizedPhrase) value = instance.Homophones |
C# |
---|
public ReadOnlyCollection<RecognizedPhrase> Homophones { get; } |
Property Value
Type: System.Collections.ObjectModel..::..ReadOnlyCollection<(Of <(<'RecognizedPhrase>)>)>A read-only collection of the recognition alternates that have the same pronunciation as this recognized phrase.
Remarks
This property returns all other recognition alternates that have the same pronunciation as this recognized phrase.
For example, for a recognition result that contained the alternates, "the tale" and "the tail", the homophones collection for the first alternate, "the tale", would contain the second phrase, "the tail". The homophones collection for the second alternate, "the tail", would contain the first phrase, "the tale".
Examples
The code fragment and utility method shown below display the Text property of the RecognizedPhrase instances returned by the Homophones property to a ListControl on a user interface.
C# | Copy Code |
---|---|
Utils.DisplayDataOnListBox(_recognizedPhraseHomophonesListBox, _recognizedPhrase.Homophones, "Text"); /* * */ // Updates alternates list with alternates of the result. internal static void DisplayDataOnListBox(ListControl list, object dataSource, string displayMember) { list.DataSource = dataSource; //result.Alternates; list.DisplayMember = displayMember; //"Text"; } |