私は音声認識を有効にした魔女のプログラムを持っています..
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;
音声認識が機能しなくなりました...
あなたの助けを得ることができますか?
どうもありがとう!