14
\$\begingroup\$

I am using Ubuntu 14.04 LTS, and the Kinect camera has type Microsoft_Xbox_NUI_Sensor_043367545147-02-Sensor.

I can access the Kinect's camera from a Linux program that I'm writing, but I'd also like to use its microphone for voice communication. How can I do that?

\$\endgroup\$
4
  • 3
    \$\begingroup\$ I'm not sure if this will be possible with the alternative NUI driver. Normally on Windows the microphone is another separate device and there is no API directly, because you can access it as a normal microphone as others are may be present. \$\endgroup\$ Commented Nov 25, 2015 at 12:06
  • \$\begingroup\$ Have you already had a look at these OpenSource Kinect Drivers? github.com/OpenKinect/libfreenect for Kinect v1 and github.com/OpenKinect/libfreenect2 for Kinect v2. As stated by the author, at least libfreenect1 supports audio. \$\endgroup\$ Commented Jan 19, 2017 at 13:03
  • \$\begingroup\$ Apparently it can be done with HARK-KINECT - somebody give it a try. \$\endgroup\$
    – Theraot
    Commented Jan 22, 2017 at 0:26
  • 1
    \$\begingroup\$ You guys should make answers from these comments. \$\endgroup\$ Commented Jan 24, 2017 at 0:58

1 Answer 1

1
\$\begingroup\$

Based on what others have said in the comments and some research I have done, here are my suggestions.

HARK-KINCET should do the job, though it does require installation. There is a possibility you could bundle installation in your game, though you will probably require permission from the developers. [Based on Theraot's answer]

The other option presented here is using the libraries here and code a program that connects to those libraries. [Based on McLovin's answer]

A solution that will only work for you would be to use the code posted here and then set that up in your kernel. You may want to check what the site said about some microphones having a bug that prevents full setup; if so use this setup command:

sudo kinect_upload_fw /lib/firmware/kinect/UACFirmware.C9C6E852_35A3_41DC_A57D_BDDEB43DFD04

If you have this bug, you will get this error:

libusbx: error [op_set_configuration] failed, error -1 errno 110
  About to send: 09 20 02 06 01 00 00 00 60 00 00 00 00 00 00 00 15 00 00 00 00 00 00 00
  libusbx: error [submit_bulk_transfer] submiturb failed error -1 errno=2
  Error: res: -1    transferred: 0 (expected 24)

From what I have read, this is probably the problem you are having. You can fix it by downloading the source and editing it, then fetching the firmware.

cd ~/Downloads
wget https://launchpad.net/ubuntu/+archive/primary/+files/kinect-audio-
setup_0.3.orig.tar.gz

From here you should follow the steps presented in the link, as my explanations may get slightly confusing. If you wish to continue with my explanation, edit the file called “kinect_upload_fw.c” so that it reads as:

index b2188d6..e3b72db 100644 (file)
b/kinect_upload_fw/kinect_upload_fw.c
@@ -155,9 +155,19 @@ int main(int argc, char** argv) {
            goto fail_libusb_open;
    }

   int current_configuration = 0;
   libusb_get_configuration(dev, &current_configuration);
   if (current_configuration != 1)
           libusb_set_configuration(dev, 1);

   libusb_claim_interface(dev, 0);

   libusb_get_configuration(dev, &current_configuration);
   if (current_configuration != 1) {
           res = -ENODEV;
           goto cleanup;
   }

    seq = 1;

    bootloader_command cmd;

Save the changes and then build and install it. This should fix the problem.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .