# Respeaker 4 mic hat instructions do not work

**URL:** <https://forums.pimoroni.com/t/respeaker-4-mic-hat-instructions-do-not-work/10526>\
**Category:** Support\
**Created:** [May 14, 2019, 8:05pm UTC](https://forums.pimoroni.com/t/respeaker-4-mic-hat-instructions-do-not-work/10526 "2019-05-14T20:05:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shifters](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@shifters](https://forums.pimoroni.com/u/shifters)\
**Post date:** [May 14, 2019, 8:05pm UTC](https://forums.pimoroni.com/t/respeaker-4-mic-hat-instructions-do-not-work/10526/1 "2019-05-14T20:05:28Z")

</div>

Hi all,

I have the respeaker 4 hat on a raspberry pi 3b+ with the newest raspbian image.

I have carefully followed the instruction on Seeeds forum page (as linked from the the product page). I have the leds workings with pixels\_demo.py, and can record with arecord and play back with aplay.

However kws\_doa.py does not work (from the 4mics\_hat library)

(env) pi@pistt:~/4mics\_hat $ python kws\_doa.py  
[‘arecord’, ‘-t’, ‘raw’, ‘-f’, ‘S16\_LE’, ‘-c’, ‘4’, ‘-r’, ‘16000’, ‘-D’, ‘default’, ‘-q’]  
arecord: main:788: audio open error: No such file or directory

I have tried other options but nothing seems capable of listening to the 4 mic hat for input correctly for speech recognition.

Typing arecord -L yields

(env) pi@pistt:~/4mics\_hat $ arecord -L  
null  
Discard all samples (playback) or generate zero samples (capture)  
playback  
ac108  
default  
sysdefault:CARD=seeed4micvoicec  
seeed-4mic-voicecard,  
Default Audio Device  
dmix:CARD=seeed4micvoicec,DEV=0  
seeed-4mic-voicecard,  
Direct sample mixing device  
dsnoop:CARD=seeed4micvoicec,DEV=0  
seeed-4mic-voicecard,  
Direct sample snooping device  
hw:CARD=seeed4micvoicec,DEV=0  
seeed-4mic-voicecard,  
Direct hardware device without any conversions  
plughw:CARD=seeed4micvoicec,DEV=0  
seeed-4mic-voicecard,  
Hardware device with all software conversions

Is there something wrong with the setup?

I have spent some 6 or 7 hours trying to get ANYTHING to respond to voice in any way without any result. I am tearing my hair out - any one any help???

This hat seems not only a bad design (does NOT sit on the pi without running fowl of the of the camera connector) but the instructions simply do not work. This is not usually the type of software support you get with products from pimoroni.

thanks

Shifters

---

<div class="post-metadata">

**Author:** ![monglet](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/monglet/32/1113_2.png) [@monglet](https://forums.pimoroni.com/u/monglet)\
**Post date:** [May 15, 2019, 6:45am UTC](https://forums.pimoroni.com/t/respeaker-4-mic-hat-instructions-do-not-work/10526/2 "2019-05-15T06:45:59Z")

</div>

Not the type of software support, because it’s not a Pimoroni product!

You may have some luck on the seeed studio forum: [https://forum.seeedstudio.com](https://forum.seeedstudio.com)

---

<div class="post-metadata">

**Author:** ![shifters](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@shifters](https://forums.pimoroni.com/u/shifters)\
**Post date:** [May 15, 2019, 8:41am UTC](https://forums.pimoroni.com/t/respeaker-4-mic-hat-instructions-do-not-work/10526/3 "2019-05-15T08:41:04Z")

</div>

Pimoroni may not manufacturer it but they do sell it so some support in actually getting the product to work at all would be appreciated!

---

<div class="post-metadata">

**Author:** ![shifters](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@shifters](https://forums.pimoroni.com/u/shifters)\
**Post date:** [May 15, 2019, 12:24pm UTC](https://forums.pimoroni.com/t/respeaker-4-mic-hat-instructions-do-not-work/10526/4 "2019-05-15T12:24:50Z")

</div>

Hi all,

ok this is how i got the hat to work with snowboy:

Follow the seeed instruction to install the driver (and test with audacity).

git clone [https://github.com/respeaker/seeed-voicecard.git](https://github.com/respeaker/seeed-voicecard.git)  
cd seeed-voicecard/  
sudo ./install.sh  
sudo reboot

sudo apt-get update  
sudo apt-get upgrade  
sudo apt-get upgrade --fix-missing  
arecord -L  
aplay -L  
arecord -l  
arecord -Dac108 -f S32\_LE -r 16000 -c 4 hello.wav  
ls

there should be a hello.wav which should play.

git clone [https://github.com/respeaker/4mics\_hat.git](https://github.com/respeaker/4mics_hat.git)  
pip3 install spidev gpiozero  
ls  
cd 4mics\_hat/  
ls  
python3 pixels\_demo.py

I used python3 and no virtual env. The leds should flash.

sudo apt-get install python-pyaudio python3-pyaudio sox  
sudo apt-get install python3 python3-all-dev python3-pip build-essential swig git libpulse-dev  
sudo apt-get install portaudio19-dev  
sudo apt-get install libatlas-base-dev

pip3 install pyaudio

---

<div class="post-metadata">

**Author:** ![shifters](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@shifters](https://forums.pimoroni.com/u/shifters)\
**Post date:** [May 15, 2019, 12:25pm UTC](https://forums.pimoroni.com/t/respeaker-4-mic-hat-instructions-do-not-work/10526/5 "2019-05-15T12:25:29Z")

</div>

Change your ~/.asoundrc file i.e. nano ~/.asoundrc

pcm.!default {  
type asym  
playback.pcm {  
type plug  
slave.pcm “hw:0,0”  
}  
capture.pcm {  
type plug  
slave.pcm “hw:1,0”  
}  
}

rec t.wav

The following should show that it can hear you through the hat microphones.

Now get snowboy:

wget [https://github.com/Kitt-AI/snowboy/archive/master.zip](https://github.com/Kitt-AI/snowboy/archive/master.zip)

unzip the file with unzip

cd into snowboy\_master and go into swig/Python3

type make

cd …/…/examples/Python3

edit the snowboydecoder.py line 5 from

from . import snowboydetect

to

import snowboydetect

You now need to generate the model for your watch/trigger word, and this is the best bit of snowboy - you can do it on their website for free and it gives you the model to download and it seems to work really well!!!

The URL is [https://snowboy.kitt.ai/](https://snowboy.kitt.ai/)

Create a login and record your model directly onto the website and then download it to your examples/Python3 folder.

type python3 demo4.py your\_model.pmdl

Speak your alert word and it will trigger - what you say next goes to google to translate into text.

I hope all those steps are clear - they are reconstructed from the bash history that i used.
