C # system.speech.recognition alternative words

I am currently using the Microsoft.Speech API to dictate utterances in the text, but I really need alternative dictations that the program could use. I use this for my graduation work, and for this I want to know the 10 best interpretations of any statement.

A very similar, if not exact, question was asked in 2011: C # system.speech.recognition alternates

But they never answered. So my question is: how do I get alternatives to interpreting dictation using the Microsoft.Speech API?

+1
source share
1 answer

This MSDN page handles what you ask pretty well. For reference, I will post the code you included. The final for the loop is what contains

// Handle the SpeechRecognized event. void SpeechRecognizedHandler(object sender, SpeechRecognizedEventArgs e) { //... Code handling the result // Display the recognition alternates for the result. foreach (RecognizedPhrase phrase in e.Result.Alternates) { Console.WriteLine(" alt({0}) {1}", phrase.Confidence, phrase.Text); } } 

Using e.Result.Alternates is the official way to get other possible words.

If this does not give you sufficient results, this MSDN page provides the necessary information. To change the level of trust rejection, you need to use UpdateRecognizerSetting on SpeechRecognitionEngine . Setting the value to 0 will cause each result to appear in Alternates along with confidence levels that you can sort to get the top 10.

+1
source

All Articles