Get Audio Stream from Kinect v2 AudioSource RRS feed

  • Question

  • I'm trying to get the Stream from Kinect.AudioSource so I can record it to a .wav file, but there seem to have been some changes on the sdk so we don't have the AudioSource.Start() method anymore.

    This is what I'm trying to do from the code I've found but can't find any way to get the Stream now

    using (Stream audioStream = audioSource.Start()) //<--- Method doesn't exist anymore
        //Simply copy the data from the stream down to the file
        int count, totalCount = 0;
        while (someCondition)
            _fileStream.Write(buffer, 0, count);
            totalCount += count;

    Ultimately, if you'd be able to suggest a different way to record the audio please let me know.


    Tuesday, September 30, 2014 1:25 PM


All replies

  • Have a look at the AudioBasics samples. For the v2 SDK, all the data is acquired through the Source->OpenReader pattern. The audio reader is exposed through the beamFrameReader, therefore call the AudioBeamFrameReader method no the KinectSensor.AudioSource.

    If you are using the event based callbacks, the audio frame data will be made available through the subframe

    // Process audio buffer

    Carmine Sirignano - MSFT

    Monday, October 6, 2014 5:03 PM
  • Carmine If we want to use computer microphone instead of Kinect microphone, but still utilize Kinect SDK, so how that would work, I remember in one of the Kinect Event, in Dallas, TX some body showed me a project in which he was loading all Audio Sources from computer and assigning to Kinect Audio Source 
    Saturday, November 29, 2014 4:48 PM
  • There is no way to use the Kinect SDK to use not Kinect devices. If you are trying to use Speech, that is not a specific Kinect SDK so you can use any device with that technology. See Microsoft Speech Platform for more details:

    Carmine Sirignano - MSFT

    Monday, December 1, 2014 7:52 PM