ReSpeaker Mic Array V2 and JAVA

Hi,



For my robotic project, I want to use the Mic Array V2 for speech record and the DOA algorithm with JAVA. I use Ubuntu 18.04 and the DOA python script demo works fine.

But I’m trying to translate this python script in Java program with usb4java library without success. I didn’t find the endpoints.

Do you have any idea or a Java sample code ?

Is the Mic Array V2 HID device ?



Thanks



Nico

Hi,



I succeeded in to translate the Python demo and write a sample code in JAVA to read the DOA and voice activity parameters. And it works perfectly in Ubuntu 18.04 with libusb.

I use the low-level usb4java library (http://usb4java.org/).

This sample code is available here : <LINK_TEXT text=“https://github.com/peltiern/robot/blob/ … 2Test.java”>https://github.com/peltiern/robot/blob/master/robot-sandbox/src/main/java/fr/roboteek/robot/sandbox/respeaker/usb4java/RespeakerMicArrayV2Test.java</LINK_TEXT>



If it can help you :wink:



Nicolas

Wow, this is great Nicolas! Glad to see you got this working.



Mind if we share this on social media? :smiley:

Would love to show off your work!

No problem to share !



I rewrite a more reusable Java classes for my robot project. For now, it is only able to read the following 3 parameters (DOA, speech detected and voice activity) but it is easy to add others. No float type.

If I have the courage, I will write a small Java library for the Mic Array with a observable / listener system to send events when the data change, and I will add the “write” method.



Nicolas

Awesome! I’ll ask our team to share it in the next couple of days.


Don’t be afraid to give it a shot. Developers in open source tend to be nice and give great feedback, or even help complete work if they find what you’ve started useful. :slight_smile:

Awesome!!! Such an excellent thread…Great stuff here. Got valuable information. Good site!

Excellent post…I got valuable information here…Thanks for this such an informative post!

Thanks for sharing. Java is supposed to be compact on the grounds that the coder conveys the java byte-code to some other stage and it needn’t bother with execution all over the place. Java is one of the most generally used programming languages, and it is utilized as the server-side language for a vast of back-end development projects, including big data and Android development. Java is an object-oriented programming language with a high level of abstraction and as few implementation dependencies as possible. Java Course in Pune