Noob, having issues with 2-mic pi hat

Hi all, new user here and pretty new to pi stuff. I have a couple of pi’s running for smart home stuff but i’m pretty much a ‘follow the instructions’ guy at present.

I thought i might have some fun with Rhasspy so i got a Pi3b+ and 2-mic pi hat, followed the manual and have it running, i can catch intents in my Home Assistant setup as well. I had to do the downgrade thing with the mic setup as it failed to work without it.

The issue i have is that its pretty much deaf - if i’m not within about 50cm of the pi then it hears nothing most of the time, playing back the audio reveals a muffled whisper.

Can this be fixed or do i need a better mic board??

Any thoughts, thanks in advance.

You can play around with the alsamixer and try different volume settings, that might help. Also, try the hintak branch of the drivers, they don’t need a downgraded kernel and contain a few fixes. I don’t have a 2mic but from what I read on this forum it should perform better than what you are describing.

Thanks, i just had a look at alsamixer but it says my device does not have any controls or something similar.

Is there a link anywhere that shows how to change to the hintak drivers - i really have no idea when it comes to linux etc :frowning:

Press F6.

That will allow you to choose which sound card alsamixer should show and you will be able to select the capture settings with F4.

If you uninstall the current sound card drivers, update again to the latest kernel and then re-install the drivers using this repository:

You should be able to install the drivers without needing to downgrade the kernel. (It worked fine for me with the 4 microphone Pi hat at least.)

Thanks, i’ll try the F6 thing then if no luck will start reading up on how to uninstall stuff i guess, this Linux is like trying to learn Japanese to me :slight_smile:

Stick at it, it gets easier with every week. :slight_smile:

When you do a aplay or arecord with a lowercase -l you will get a list of devices

when you do the same with a uppcase -L you get a list of available PCMs

pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: IQaudIOCODEC [IQaudIOCODEC], device 0: IQaudIO CODEC HiFi v1.2 da7213-hifi-0 [IQaudIO CODEC HiFi v1.2 da7213-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

All linux commands -h / --help give you basic paramters.

Often there is the Pi built in audio that for many just confuses and with a hat just turn of by editing /boot/config.txt and put a hash infront so that it becomes a remark

# Enable audio (loads snd_bcm2835)

You can press f6 to select or just pass the card index alsamixer -c1 or whatever

Have a look at Ideal Settings for reSpeaker 2-mic hat

Just copy and paste and see how you go.

To further confuse even if a device is shared its settings and conf files are totally separate when in a docker container as docker containers are isolated as thats the point.
You need to docker exec -it <container_name> /bin/bash and check and set inside the container

Also don’t use hw:0 indexes use plughw:0 indexes as that enables software autoconversion so any sampling rate or format error will just get converted rather than fail

Don’t use the desktop version of Raspberry as the addition of pulseaudio as default further confuses.

Thanks for that, i will have a look later

I do know i used the lite version of Raspberry OS as i followed the Rhasspy install guide :wink:

1 Like
#pcm default to allow auto software plughw conversion
pcm.!default {
  type asym
  playback.pcm "play"
  capture.pcm "cap"

#pcm is pluhw so auto software conversion can take place
#pcm hw: is direct and faster but likely will not support sampling rate {
  type plug
  slave {
    pcm "plughw:0,0"

#pcm is pluhw so auto software conversion can take place
#pcm hw: is direct and faster but likely will not support sampling rate
pcm.cap {
  type plug
  slave {
    pcm "plughw:0,0"

#sudo apt-get install asound2-plugins
#will use lower load but poorer linear resampling otherwise
defaults.pcm.rate_converter "speexrate"
#Set default mixer controls
defaults.ctl.card 0

sudo apt-get install asound2-plugins to install the alsa-plugins as really the default rate convertor is speexrate if installed or linear if not.

save as /etc/asound.conf for systemwide or ~/asoundrc for user based
Change the index :0,0 to your card

You should see PCMs play & cap listed… But they will be defaults so just use sys default

seems i have a lot of learning ahead :slight_smile:

thanks, will have a play later, the best thing i have learnt so far is that its so easy to wipe the OS and start again on a Pi if I make a mess in there :slight_smile:

Yeap and pre setup wifi & ssh

1 Like

Is there a version of the “Ideal sound settings” link suitable for idiots like myself?

I can increase the mic level in alsamixer but it resets after a reboot - can it be made permanent???

1 Like