What node can using for ReSpeaker 2 Mic Array Pi HAT v1.0

i have install ReSpeaker 2 Mic Array with raspberry Pi 3 (hardware)... how can i use the mic on ReSpeaker 2 Mic Array? need install anythings(software)? and need using what node for receive sound ?

because in my project have a microphone node that will direct use the laptop microphone ...

When you installed the drivers according to the seeedstudio wiki instructions you can use https://flows.nodered.org/node/node-red-contrib-mic same as on your laptop. Just make sure the hw source entered in the nodes config is the one of the respeaker mic.
You can check which card number the respeaker has by running arecord -l from the commandline.
Instead of the mic node you could also use an exec node to run something like a sox record command which would give you more options for things like maximum recording duration and a silence detection which is more finely controllable.


how do i know it success or fail? it i speak to it, have will any respond?

Did you try it? Add a catch node connected toe a debug node (set to display Complete msg object) and see what happens.

it like nothing happen..

where is the node-red-contrib-mic node?

Please explain what you think is going on in this flow. I want to hear your thoughts.

above is my project using voice to open door...actually i dont kmow how it work ...i install the respeaker 2 mic on my reapberry... i want the respeaker can receive my sound directly and run this flow...
on above microphone node, it will directly use my laptop microphone... because the raspberry later need install on door so, it want respeaker on respberry can directly the sound...because cannot install the laptop on the door...

so it need to know have any node can receive the sound directly from respeaker and how does i know the respeaker have receive my sound successfully..

It looks like you are in uncharted territory. (Not having that hat I can't experiment)

You might want to see if you can write a python program to listen for sound and then send a message to NR via mqtt.

Good Luck and let us know what you come up with.

Hello I will take you through it step by step first test if you can record from the respeaker mic and its installed correctly.
For this please go to your commandline of the raspberry pi and type arecord -l
You should see an output with a list like this:

**** List of CAPTURE Hardware Devices ****
card 1: ArrayUAC10 [ReSpeaker 4 Mic Array (UAC1.0)], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

of course yours should list the 2mic hat and not the array i had connected to the pi where i did this.
If it shows you the 2mic hat in that list than its installed correctly.
If that is the case go into the settings of the mic node and set the device to the card number that was shown in the list next to the entry for the respeaker 2 mic like i did here:

You can use/import this example flow to test it:


When you correctly configured everything and you click start you should see something like this:

Where you can see the raw pcm buffer chunks in your debug tab.
Once you are that far or if you have any problems come back here and i will help you with the rest.
You will have to think of some kind of wakeword detection or another way to start the recording and you will probably have to concat all those buffers to a single buffer object with wav headers at some point and i can help you with all that but please get the streaming of raw audio chunks from the mic into nodered working first.



it no show anything and it no volume control this devices..

Did you install the custom drivers that seeedstudio supplies for their raspberry pi microphone hats?
click on this link and follow their instructions to install the necessary drivers in step two.

yes ..i have , but just now i have use sudo raspi-config to do something for audio because want link the bluetooth...before that i have output like you when run arecord -l

What ever you did probably interfered with the driver installation. You could try to uninstall it using the uninstall script they supply and than install them again.

i no install anything...

Something you did did. I have used quite a few of those respeaker mics in the last few years and I hadn’t had anything like this happen. I would try uninstalling and reinstalling those drivers again. Make a backup before of anything critical of course.

okey, the problem is solved ...
then now i want link to speech to text node, but it show error...

Yes because the watson stt node expects a single wav buffer object but straight from the mic node you get raw pcm audio chunks as a stream of buffers. So you need to join the buffers and add wav headers to it. You will need to install https://flows.nodered.org/node/node-red-contrib-wav in nodered.
Than import this flow:


This will give you a single wav buffer once you stop recording. You should be able to feed this straight into the watson stt node as according to this example it accepts wav data passed in as a buffer which this is.

but it no text at output...like respeaker no receive my sound...