我怀疑 SAPI 在语音识别方面是否具有良好的准确性?当我尝试从一到十读取数字时,准确率甚至不到 3%。我怀疑我做错了还是SAPI本身在准确性方面不稳定?令我震惊的是,引擎无法完美识别 1 到 10 个数字。我厌倦了它的准确性,我们还有其他用于语音识别的 C# 开源吗
我的代码是
我将在这里给出我的代码片段
private Grammar Grammar Creation()
{
Choices NumberChoice = new Choices("one", "two", "three", "four", "five", "six", "seven", "eight","nine","ten");
GrammarBuilder NumGrammarBuilder = new GrammarBuilder(NumberChoice);
var NumGrammar = new Grammar(NumGrammarBuilder);
return NumGrammar;
}
and i am recognizing like this
recognitionEngine.UnloadAllGrammars();
Grammar cg = CreateSampleGrammar();
recognitionEngine.LoadGrammar(cg);
recognitionEngine.RecognizeAsync(RecognizeMode.Multiple);
recognitionEngine.SetInputToDefaultAudioDevice();
recognitionEngine.SpeechRecognized += (s, args) =>
{
foreach (RecognizedWordUnit word in args.Result.Words)
{
// You can change the minimun confidence level here
if (word.Confidence > 0.8f)
freeTextBox.Text += word.Text + " ";
}
freeTextBox.Text += Environment.NewLine;
};
问候布万