Azure-Kinect-Sensor-SDK icon indicating copy to clipboard operation
Azure-Kinect-Sensor-SDK copied to clipboard

How to use the microphone

Open nicolascarre opened this issue 7 years ago • 21 comments

Hello,

Is there a way to get the sound received from the microphone ? Actually I just need to know what is the volume in decibel. From some others device, I was retrieving a sample array, then compute the volume in db. I see nothing about the microphone in the sdk.

Thanks for your help

nicolascarre avatar Jul 24 '19 12:07 nicolascarre

The microphone is a available through platform standard recording APIs on Linux and Windows. If you are looking for integration with Azure Speech Services look here:

https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/

cdedmonds avatar Jul 24 '19 15:07 cdedmonds

I have already researched about Speech, I don't find anything about a sample array.

nicolascarre avatar Jul 24 '19 15:07 nicolascarre

The Sensor SDK does not currently support accessing the microphones through the API. The system-level audio APIs should be used instead. The Kinect Viewer app uses libsoundio, which is a cross-platform audio library. You could also use a platform-specific api like WASAPI on Windows, or PulseAudio on linux.

Here is some relevant code from the viewer that correlates microphones to a specific kinect device: https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/tools/k4aviewer/platform/windows/k4adevicecorrelator.cpp

xthexder avatar Jul 24 '19 18:07 xthexder

This is an area we could improve the documentation.

cdedmonds avatar Jul 25 '19 17:07 cdedmonds

I can't compile the k4aviewer from the source code, I have already tried a lot of things, nothing is working. Is there somewhere a good documentation of how to integrate the libsoundio ?

nicolascarre avatar Aug 07 '19 08:08 nicolascarre

I can't compile the k4aviewer from the source code, I have already tried a lot of things, nothing is working. Is there somewhere a good documentation of how to integrate the libsoundio ?

Hi @nicolascarre please open a new issue and follow our bug template.

wes-b avatar Aug 07 '19 15:08 wes-b

Here is the new issue : https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/606

nicolascarre avatar Aug 07 '19 16:08 nicolascarre

Hello, Any update expected about using the microphone ?

PierrePlantard avatar Dec 11 '19 11:12 PierrePlantard

@PierrePlantard, the Azure Kinect DK microphone is supported by Speech device SDK. Please follow the link to see the full documentation.

tesych avatar Jan 22 '20 18:01 tesych

@nicolascarre @PierrePlantard --- I tried a third party library odas for audio recording: https://github.com/xiaotaw/odas.git. Hope it helps.

xiaotaw avatar Apr 14 '20 09:04 xiaotaw

Hi @xiaotaw, thank you for the link, we will test it !

PierrePlantard avatar Apr 14 '20 10:04 PierrePlantard

Hello, Is there a way to get the sound received from the microphone ? Actually I just need to know what is the volume in decibel. From some others device, I was retrieving a sample array, then compute the volume in db. I see nothing about the microphone in the sdk. Thanks for your help Hi, nicolascarre.Do you resolve the problem? I had a same question, too.

ttxiaoxitt avatar Apr 28 '20 07:04 ttxiaoxitt

Hi @ttxiaoxitt, Yes we finally found a solution. We use the NAudio library. If you need help I can provide you a sample.

nicolascarre avatar Apr 28 '20 08:04 nicolascarre

Hello @nicolascarre !

I am in a similar situation as you currently. I am trying to access the microphone array data retrieved by the Kinect DK (in decibels of each microphone). I have looked into using ODAS or WASAPI. Do you mind helping me? It appears you were able to arrive at a solution.

keenanfitzharris avatar Jul 13 '20 21:07 keenanfitzharris

Hi, @nicolascarre I would like heve the sample, please thank you very much.

yuchienhsiao avatar Sep 23 '20 02:09 yuchienhsiao

Hi @ttxiaoxitt, Yes we finally found a solution. We use the NAudio library. If you need help I can provide you a sample.

I'm in a similar situation,too.May I have the sample? Thank you very much.

isaacwong96 avatar Oct 13 '20 07:10 isaacwong96

Hi @ttxiaoxitt, Yes we finally found a solution. We use the NAudio library. If you need help I can provide you a sample.

@nicolascarre Hey Nicolas - would you please provide your sample using NAudio to capture audio? It would be most appreciated. Thank you!

jessekirbs avatar May 18 '21 18:05 jessekirbs

Hi @ttxiaoxitt, Yes we finally found a solution. We use the NAudio library. If you need help I can provide you a sample.

@nicolascarre Hi Nicolas, is it possible for you to share the NAudio audio capture sample? Thanks a lot!

sanweiliti avatar Aug 19 '21 16:08 sanweiliti

Try Microsoft Media Foundation: https://docs.microsoft.com/en-us/windows/win32/medfound/audio-video-capture-in-media-foundation

knat avatar Aug 19 '21 17:08 knat

I believe this repository could help! With it you could know how to access to the raw data of the microphone array, and how to save the color image with C#.

TristanWYL avatar Sep 08 '21 09:09 TristanWYL