none
Extract in a separate way sound signal from Kinect microphones? RRS feed

  • Question

  • Hi everybody, 

    I'm trying to extract sound signal in separate way from Kinect microphones but I have any question...

    First of all I'm working on:

    Windows 7, Kinect SDK 1.8 and Kinect v1

    I already installed Visual Studio 2010 C# and C++ for working with Kinect and I tested the capturing of audio data in c# (following this link: https://msdn.microsoft.com/en-us/library/hh855349.aspx)

    I guess that I caught the sound signal with all four microphones of Kinect because in the microsoft tutorial there is only one stream of input, is it true?

    How can I get the signal only from a single microphone of Kinect?

    Can someone help me please?


    • Edited by Ilario91 Sunday, May 10, 2015 8:28 AM
    Tuesday, May 5, 2015 3:12 PM

All replies

  • There are no audio processing api's provided in managed code. You will have to process each audio sample and pull out the data. It is in a PCM format that represents 4channel audio.

    Carmine Sirignano - MSFT

    Friday, May 8, 2015 6:38 PM
  • Hi, 

    First of all Thanks for answer

    I didn't understend well How can I pull out the data from each audio sample and pull out the signal for a single microphone's channel?

    Do you think that is it possible using C#? Because with C# I can take only one sample PCM (16 bit) and I image that this sample is alredy merged of all 4 microphones's channels?

    is it possibile slip a PCM sample of 16 bit in PCM 4 sample of 16 bit? 

    My code is:

    /// Number of milliseconds between each read of audio data from the stream.
    /// Faster polling (few tens of ms) ensures a smoother audio stream visualization.
    
    private const int AudioPollingInterval = 50;
    
    /// Number of samples captured from Kinect audio stream each millisecond.
    
    private const int SamplesPerMillisecond = 16;
    
    /// Number of bytes in each Kinect audio stream sample.
    
    private const int BytesPerSample = 2;
    
    public static byte[] audioBuffer = new byte[AudioPollingInterval * SamplesPerMillisecond * BytesPerSample];
    
     /******** Kinect's connession in correct way *********/
    
    var source = sensor.AudioSource;
    var audioStream = source.Start();
    
    reading = true;
    while (reading)
    {
    int readCount=audioStream.Read(audioBuffer, 0, audioBuffer.Length);
    
    for (int i = 0; i < readCount; i += 2)
    {
                        
    short audioSample = BitConverter.ToInt16(audioBuffer, i);
    Console.Write(audioSample);
                    }
                }


    • Edited by Ilario91 Sunday, May 10, 2015 8:58 AM
    Sunday, May 10, 2015 8:57 AM