ReSpeaker Mic Array V2 and JAVA

info about ReSpeaker series products

Moderators: lily.li, violet, seth.welday

Post Reply
peltiern
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Sun Mar 31, 2019 5:30 pm

ReSpeaker Mic Array V2 and JAVA

Post by peltiern » Sun Mar 31, 2019 5:44 pm

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

peltiern
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Sun Mar 31, 2019 5:30 pm

Re: ReSpeaker Mic Array V2 and JAVA

Post by peltiern » Sun Apr 07, 2019 12:57 am

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 : https://github.com/peltiern/robot/blob/ ... 2Test.java

If it can help you ;)

Nicolas

seth.welday
Staff
Staff
Posts: 35
Joined: Mon Mar 26, 2018 10:04 am

Re: ReSpeaker Mic Array V2 and JAVA

Post by seth.welday » Mon Apr 08, 2019 10:16 am

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

Mind if we share this on social media? :D
Would love to show off your work!
---------------
Seth Welday
Human Being @ Seeed

peltiern
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Sun Mar 31, 2019 5:30 pm

Re: ReSpeaker Mic Array V2 and JAVA

Post by peltiern » Tue Apr 09, 2019 1:20 am

seth.welday wrote:
Mon Apr 08, 2019 10:16 am
Mind if we share this on social media? :D
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

seth.welday
Staff
Staff
Posts: 35
Joined: Mon Mar 26, 2018 10:04 am

Re: ReSpeaker Mic Array V2 and JAVA

Post by seth.welday » Tue Apr 09, 2019 11:15 am

Awesome! I'll ask our team to share it in the next couple of days.
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.
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. :)
---------------
Seth Welday
Human Being @ Seeed

pritakanate
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Mon Apr 22, 2019 5:22 pm

Re: ReSpeaker Mic Array V2 and JAVA

Post by pritakanate » Mon Apr 22, 2019 5:24 pm

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

radhikahande1993
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Wed May 29, 2019 5:18 pm

Re: ReSpeaker Mic Array V2 and JAVA

Post by radhikahande1993 » Wed May 29, 2019 5:23 pm

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

Post Reply