Tools: Visual Studio 2010, Kinect SDK1.5, Speech SDK 11
Hardware: ASUS A43S, XBOX 360 Kinect.
1. Kinect SDK GreenScreen-WPF
2. WindowLoaded
Add
2-1 remove AllFrameReady event
this.sensor.AllFramesReady -= this.SensorAllFramesReady;
2-2 Add timier 10 secs
計時器.Interval = new TimeSpan(0, 0, 10); // 10 secs
計時器.Tick += new EventHandler(計時器_Tick);
計時器.Start();
2-3 Add voice commands
Choices CMDs = new Choices();
for (int i = 0; i < 地點名稱陣列.Length; i++)
CMDs.Add(地點名稱陣列[i]);
....
2-4 Timer event: Enable sensor and disable voice command or vice verse
if (EventOn)
{
EventOn = false;
this.sensor.AllFramesReady -= this.SensorAllFramesReady;
sre.RecognizeAsync(RecognizeMode.Multiple);
}
else
{
EventOn = true;
this.sensor.AllFramesReady += this.SensorAllFramesReady;
sre.RecognizeAsyncCancel();
}
3.
4. 下載
沒有留言:
張貼留言