我已经能够在 kinect 上进行语音识别。但是,我正在尝试提高识别某些单词的效率,即使它们是句子的一部分。
this.speechEngine = new SpeechRecognitionEngine(ri.Id);
var words = new Choices();
words.Add(new SemanticResultValue("emerging", "EMERGING"));
words.Add(new SemanticResultValue("expiriences", "EXPIRIENCES"));
words.Add(new SemanticResultValue("paris", "PARIS"));
words.Add(new SemanticResultValue("atlanta", "ATLANTA"));
words.Add(new SemanticResultValue("creative", "CREATIVE"));
words.Add(new SemanticResultValue("back", "BACK"));
var gb = new GrammarBuilder { Culture = ri.Culture };
gb.AppendWildcard();
gb.Append(words);
var g = new Grammar(gb);
speechEngine.LoadGrammar(g);
speechEngine.SpeechRecognized += SpeechRecognized;
speechEngine.SetInputToAudioStream(
this.audioStream, new SpeechAudioFormatInfo(EncodingFormat.Pcm, 16000, 16, 1, 32000, 2, null));
speechEngine.RecognizeAsync(RecognizeMode.Multiple);