我有一个女巫程序,我用它启用了语音识别..
RecognizerInfo ri = GetKinectRecognizer();
speechRecognitionEngine = new SpeechRecognitionEngine(ri.Id);
// Create a grammar from grammar definition XML file.
using (var memoryStream = new MemoryStream(Encoding.ASCII.GetBytes(fileContent)))
{
var g = new Grammar(memoryStream);
speechRecognitionEngine.LoadGrammar(g);
}
speechRecognitionEngine.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(speechEngine_SpeechRecognized);
speechRecognitionEngine.SpeechRecognitionRejected += new EventHandler<SpeechRecognitionRejectedEventArgs>(speechEngine_SpeechRecognitionRejected);
SpeechRecognitionEngine.SetInputToAudioStream(sensor.AudioSource.Start(), new SpeechAudioFormatInfo(EncodingFormat.Pcm, 16000, 16, 1, 32000, 2, null));
speechRecognitionEngine.RecognizeAsync(RecognizeMode.Multiple);
..
一切正常,SpeechRecognized 事件被正确触发..
问题是,当我启用骨骼数据跟踪时,
sensor.SkeletonStream.Enable();
sensor.SkeletonStream.TrackingMode = SkeletonTrackingMode.Seated;
sensor.SkeletonFrameReady += sensor_SkeletonFrameReady;
语音识别停止工作...
我能得到你的帮助吗?
非常感谢!