Seedstudio 4 Mic Array not recognised by Picroft

Hello Guys,
I Have my Picroft quite a while now, however, never functioning.

So here is the story:

I ve came up with a setup of a Rpi 4 2gb ram with an headphone jack speaker, ethernet connection, Seedstudios 4 mic array and Kingston High endurance 32GB MicroSD Card.

so far so good…

I wrote the latest image to the card with the help of Etcher, set everything up, followed the driver install guide from Seedstudio (Guide from Seedstudio) and even installed the Skill from j1nx “h.ttps://community.mycroft.ai/t/respeaker-4-mic-array-hat-mycroft-a-i-skill/5773/41” wich makes the LEDs blink.

sadly, whatever I am trying to do, I dont get the mic being recognised by Mycroft, however the speaker output and blinking LEDs just turn out to be fine.

So here comes the part where I am searching for your advise:

  • Whenever I make a call the mic level stays zero
  • when I make the call to get the name for the soundcard (as stated in the guide: ~/seeed-voicecard $ arecord -L) it just returns its a directory
  • when using the command from this site " pactl list sources short"
    Mycroft Troubleshooting page, it just returns :

0 alsa_output.platform-bcm2835_audio.analog-mono.monitor module-alsa-card.c s16le 1ch 48000Hz SUSPENDED

  • when trying to make a record with “arecord -Dac108 -f S32_LE -r 16000 -c 4 hello.wav”, it returns

ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM ac108
arecord: main:828: audio open error: No such file or directory

  • when using the mic array on a blank raspbian, it works just fine until the moment I install Mycroft (followed Guide “h.ttps://www.j1nx.nl/project-1/diy-home-personal-ai-assistant-installing-configuration-part-4/”)

I am assuming Mycroft is messing up the mic input does anyone know how to fix this ?

Any help would be great, thanks (:

mycroft isn’t doing anything here. Your system doesn’t recognize the device as a pulse input:
when I make the call to get the name for the soundcard (as stated in the guide: ~/seeed-voicecard $ arecord -L) it just returns its a directory

If it’s working at some point, and not after, then something about what happens in that step is going to be suspect. Someone who has that device might be able to offer more direct help, but reviewing what goes on in the guide you followed might be useful in the mean time.

This one is rather old (@j1nx maybe have some update on that one) , and i hope you followed the other 3 parts. From a short look i can see that Pulse is set up systemwide, so mycroft has to set up to embrace this fact.
The Arrays are relatively easy to set up with the install script (seeed-voicecard) doing the heavy lifting. I wouldn’t make the mistake to troubleshoot from the perspective of a tut which main focus was to setup an embedded device: OVOS (formerly known as MycroftOS). Why don’t you simply use his alpha image (and help develop it further)? I would guess that at least the voicecard problem is gone using his image

Not much time but if “arecord -L” doesn’t return the respeaker mic then the kernel modules are not loaded.

Either they are not properly build for your kernel, not loaded at all or already crashed (see link below)

(Keep in mind the respeaker drivers are very wonky with the new 5.x kernel. 32bit and 64bit)

1 Like

Thanks for all your replies !

baconator:
If it’s working at some point, and not after, then something about what happens in that step is going to be suspect. Someone who has that device might be able to offer more direct help, but reviewing what goes on in the guide you followed might be useful in the mean time.

Yea I know, because of that I have redone the Seedstudio Tutorial for the installation, since this is the only step I can repeat (the rest is the ready made setup from Mycroft).

SGee:
This one is rather old (@j1nx maybe have some update on that one) , and i hope you followed the other 3 parts… easy to set up with the install script (seeed-voicecard)…Why don’t you simply use his alpha image

As far as I could, I followed the guide, but I stumbled over additional problems. But its not the current installation, it was just a try to see if it solves my problem, it didnt… I have used an install script from Seedstudio, its from Seedstudios Guide cd seeed-voicecard; sudo ./install.sh (step 2), is this the one You stated ? … I am using a Mycroft Image right now, its this one “Picroft stable disk image” (link), is that one correct, did you mean that with Alpha Image ?

j1nx:
Not much time but if “arecord -L” doesn’t return…Either they are not properly build for your kernel, not loaded at all or already crashed (see link below)
(Keep in mind the respeaker drivers are very wonky with the new 5.x kernel. 32bit and 64bit)

I really hope my mic array isnt having any of the problems you stated. However when I read your quote of the arecord command, I realised that my Syntax was wrong. From the Tutorial it seemed to be smth. like this ~ $ arecord -L but it seems to be more like arecord -L

So i fed it in the console and actually got something: (left side is what I got, right side is how it should look)


It looks like there is something missing, do you know how to add that ?

Furthermore I also made a picture of the console output, when I force mycroft to interact with me.
It then actually speaks out the question, starts the recording, I answer, but he cant recognise
(propably the sound file is empty)

I’m talking about OpenVoiceOS (mycroft based GUI distro)
The tutorial you are talking about is work that lead to OVOS. Yet it’s set up differently and isn’t compareable (unless you have a deeper understanding of the core elements).

For debugging your problem: it is always good practice to look at /var/log/mycroft/*.log if you’re looking for causes

Lot to unpack here.
If you are running picroft and not have tinkered with /etc/mycroft/mycroft.conf
i expect this line here “play_wav_cmdline”: “aplay -Dhw:0,0 %1”

If you followed J1nx’ path first off you need to use paplay, then the specification -Dhw:0,0 should be tossed (in general) in both play_wav and play_mp3

Since we don’t know where you are at with mixing jinx ovos setup/picroft we can’t give informed suggestions.

That said, there are some config files the voicecard installer sets softlinks to (if i’m not mistaken): One of which is
seeedvoicecard/pulseaudio/pulse_config_4mic/default.pa

This default.pa values/modules are not exactly set up to what mycroft needs
The following lines are derived from OVOS for a RespeakerV2 USB, you just have to specify the base directory where you put the driver/install package

sudo sed -i "s/^load-module module-stream-restore/#load-module module-stream-restore/" /directory-where-you-put-the-driver/seeedvoicecard/pulseaudio/pulse_config_4mic/default.pa
sudo sed -i "s/^load-module module-role-cork/#load-module module-role-cork/" /directory-where-you-put-the-driver/seeedvoicecard/pulseaudio/pulse_config_4mic/default.pa
sudo sed -i "s/^load-module module-suspend-on-idle/#load-module module-suspend-on-idle/" /directory-where-you-put-the-driver/seeedvoicecard/pulseaudio/pulse_config_4mic/default.pa
sudo sed -i "s/^load-module module-udev-detect/load-module module-udev-detect tsched=0/" /directory-where-you-put-the-driver/seeedvoicecard/pulseaudio/pulse_config_4mic/default.pa
sudo sed -i 's/^#load-module module-native-protocol-tcp/load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0\/16;172.16.0.0\/12;10.0.0.0\/8 auth-anonymous=1/' /directory-where-you-put-the-driver/seeedvoicecard/pulseaudio/pulse_config_4mic/default.pa
sudo sed -i "s/^load-module module-native-protocol-unix/load-module module-native-protocol-unix auth-anonymous=1/" /directory-where-you-put-the-driver/seeedvoicecard/pulseaudio/pulse_config_4mic/default.pa
sudo sed -i "s/^#load-module module-zeroconf-publish/load-module module-zeroconf-publish/" /directory-where-you-put-the-driver/seeedvoicecard/pulseaudio/pulse_config_4mic/default.pa

The last line needs module-zeroconf-publish installed: sudo apt-get install module-zeroconf-publish

To circumvent such problems for future users a setup script should be made where the (voicecard) installer got sourced - to work with their variables - (if possible) and sent to me to incorporate it in the setup refactor.

I had a very similar issue and just finally got my ReSpeaker 2 mic to work. After going around in circles for several days chasing down all sorts of errors and issues, I finally did a fresh install and this time I skipped the setup wizard and just installed the drivers from github.

respeaker / seeed-voicecard My picroft is now working. I have a minor issue to figure out, but once I get that worked out, then I can start having fun with it.

Daryl

did you check if these two libs gpiozero spidev are installed ?
pip freeze

install python -m pip install gpiozero

install python -m pip install spidev

Hey, thanks again for all these replies, didnt expected that much activity, im really impressed by the Mycroft community now. Sadly I havent had much time to apply all your suggestions, but this weekend i tried a new installation on a new micro sd card, after a few flashing problems, and skipping the automatic setup, like @rosede suggested. I just installed the Seedstudio Library, etc. and now everything works fine. Im really happy with the end result. @maxim.nomens, yes they luckily already have been installed.
Im also very thankful for the time @SGee must have spent to give so detailed information for debugging, I will keep that in mind if I step in additional problems