Ejemplo n.º 1
0
 public SpeechRecognition(KinectSensor kinect, KinectAudioStream convertStream)
 {
     this.kinectSensor    = kinect;
     this.useSystemMic    = true;
     this.speechPublisher = new NetworkPublisher();
     this.speechPublisher.Bind("33405");
     this.convertStream = convertStream;
     this.sentenceId    = 0;
 }
Ejemplo n.º 2
0
        private void OpenKinectSensor()
        {
            // Only one sensor is supported
            this.kinectSensor = KinectSensor.GetDefault();

            if (this.kinectSensor != null)
            {
                // open the sensor
                this.kinectSensor.Open();

                // grab the audio stream
                IReadOnlyList <AudioBeam> audioBeamList = this.kinectSensor.AudioSource.AudioBeams;
                System.IO.Stream          audioStream   = audioBeamList[0].OpenInputStream();

                // create the convert stream
                this.convertStream = new KinectAudioStream(audioStream);
            }
        }
 public SpeechRecognition(KinectSensor kinect, NetworkPublisher network, KinectAudioStream convertStream)
 {
     this.kinectSensor  = kinect;
     this.network       = network;
     this.convertStream = convertStream;
 }