'C# Speech Recognition Accurate Alternative To DictationGrammar?

I wanted to try to work on a voice assitant program using C# and System.Speech.Recognition because I really liked how accurate it was when I specified a word in grammar but I'm having some difficulty.

what I want to do is when I say for example [bot name] play [song name] I want it to run gui automation code to find the song and play it.

my main problem is that I tired using DictationGrammar for this but it is very inaccurate

and also when I specify the command play in the grammar so it can detect the command accurately, I can't really tell it to capture any song name after that, as I have to specify the song name in code but I want it to be able to detect any song name no matter what the name is

I hope that I explained the problem properly, forgive me if I didn't.



Solution 1:[1]

Maybe this help you: https://stackoverflow.com/a/22978876/18452174

If you need more accuracy, try using Windows.Media.SpeechRecognition instead System.Speech.Recognition.

Another option is make a previous search of all your songs (if you are playing your own library) and create a concrete grammar for your songs.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Victor