sensor & sensorChooser will not work/start together (voice recognition) - Microsoft Kinect C#
<p>I am trying to create an Interface for use with the Windows Kinect using C#. I have been able to implement everything so far and the gesture movement works perfect using the hand cursor. I then had the task of implementing Voice recognition into the program so the user can also give the program voice commands alongside with using gestures. The problem is within my Window_Loaded method, I have placed a sensor.Start(); and sensorChooser.Start(); within the method, but only one of them will work depending which is declared first. </p>

<p>My question is how can I fix this to be able to run both sensor and sensorChooser, to be able to use voice recognition and gestures.</p>

<p>Thanks for the help, here is the method so far.</p>

<p>private void Window_Loaded(object sender, RoutedEventArgs e)
        {</p>

<pre><code>        if(KinectSensor.KinectSensors.Count &gt; 0)
        {
            sensor =  KinectSensor.KinectSensors[0];
        }


        this.sensorChooser = new KinectSensorChooser();
        this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
        this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
        initializeSpeech();

        sensor.Start();
        sensorChooser.Start();



        //string[] lines = { "using System;", "namespace First {", "public class Program {", "public static void Main() {", @"Console.WriteLine(""Hello test!""); } } }" };
        //System.IO.File.WriteAllLines(@"C:\Users\John\Documents\University\Interface Programming\CW 2\WpfApplication1\test2.txt", lines);
        //string code = System.IO.File.ReadAllText(@"C:\Users\John\Documents\University\Interface Programming\CW 2\WpfApplication1\test2.txt");
        //runCode(code);

        string fileDirectory = System.IO.Directory.GetCurrentDirectory() + @"\User Projects";
        DirectoryInfo textFileDirectory = new DirectoryInfo(fileDirectory);
        FileInfo[] Files = textFileDirectory.GetFiles("*.txt");
        Thickness m = Margin;
        m.Left = 0;
        foreach (FileInfo file in Files)
        {
            KinectTileButton btn = new KinectTileButton
            {
                Label = file.Name,
            };
            btn.Click += buttonRunCode;
            btn.VerticalAlignment = VerticalAlignment.Center;
            btn.HorizontalAlignment = HorizontalAlignment.Left;
            loadedButtons.Children.Add(btn);
        }                       
    }
</code></pre>