I am performing speech recognition on wave files, searching for a total or partial match of a given sentence.
The program takes as input - a Wave file - a Sentence and should return a 0.0 to 1.0 "matching confidence" value.
1) I create an InProcRecognizer 2) I create a ISpeechRecoContext from the InProcRecognizer 3) I connect the Context to the Recognizer 4) I create a SPFileStream and point it to the Wav file 5) I point the Recognizer to the SPFileStream through AudioInputStream
At this point, several hypothesis events are fired, and the recognition is already fairly correct.
However this is working without a grammar at all.
Now, I suppose that, to limit recognition to a specific sentence, I should work with a grammar. I know how to create a new empty one programmatically, but I am at a loss on what to do next.
I have searched everywhere and can't find a clear direction or tutorial (actually most of the code out there is severely outdated and referring to Sapi 5.0 from 14 years ago)