You can check the result's Confidence property in your SpeechRecognized
event.
void recognizer_SpeechRecognized(object sender, SpeechRecognizedEventArgs e)
{
if(e.Result.Confidence > THRESHOLD)
{
//matched
}
else
{
//not reliable enough, so consider it unmatched
}
}
You can experiment with different values for THRESHOLD
, between 0.0 and 1.0. The higher the threshold, the more "strict" it will be (although if you put it too high, you might start to lose recognition). Try starting around a THRESHOLD
value of 0.7
and then adjust it from there.