ReSpeaker 4-Mic Array HAT Mycroft A.I. Skill

Hi,

does Mycroft/Picroft support the 2-Mics-PiHat out of the box? Or is there another setup i don’t know yet…
Or does the 4-Mic-Skill works also with 2 Mics?

Cheers and thanx
Caruso

@mtwannabe No updates from my side. Just to busy with all other crap in life :wink:

The microphone itself works perfectly though. Just follow the wiki of seeed and you should be good to go. I believe all mic array RPi board use the same driver, so should all work.

@suisat Do you have time to checkout the latest version of this skill?

Did some changes that I tried to test, but when loading the skill my whole RPI stalled ?!? Thought I did something wrong, but considering that I suspect my RPI is hardware failing on me (Wifi troubles as described in my MycroftOS thread) and the wifi is a SDIO system as well. Perhaps the stalling is related to that same hardware failing crap.

Just checkout the new version to check. Please be aware that the; “sudo usermod -g gpio pi” command is not integrated yet. So please add your user running mycroft to that group and don’t forget to enable GPIO within the confix.txt fro your device.

Could you give it a go and report back?

(Or anyone else for that matter if they have the respeaker

1 Like

Nice! I will check that later and give you a report.

I got the Array itself running on the RP4 without any problems, but after installing the skill I only get this error. :-/

Traceback (most recent call last):
  File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py", line 66, in wrapper
    handler(message)
  File "/opt/mycroft/skills/respeaker-4mic-hat-skill.j1nx/__init__.py", line 76, in handle_listener_started
    pixel_ring.set_color_palette(self.main_blue, self.main_blue)
AttributeError: 'PixelRing' object has no attribute 'set_color_palette'
 16:27:08.565 | INFO     |   732 | AlarmSkill | on ended...

Right, that was stupid of me. One thing at the time.

Commented out the led color change and pushed the update to Github.

Could you try it again?

Thanks, the errors are gone and when booting the LEDs are blinking once… at least :wink:
Furthermore I dont recognize anything, but unsure where the error is hiding…
What should/can I do from here? is there a “manual” regarding any commands? I can enable and disable it without any further effects. Logs keep quite empty. :-/
Greetz
Kelvin

Apologies, my new RPI is not in yet (mainly because I didn’t order it yet)

Pushed some changes to the repository a few days ago. If you are into it, you might give it another go.

Confirmed it is now working with the default LED color pattern;

Next on the list is to create a Blue-ish Mycroft LED pattern for the different stages of the voice input; Wake up, listening, thinking, etc…

Something that looks more like the Mycroft logo/icon (half a circle spinning of some kind).

2 Likes

Ah, its finally working.
Thanks

1 Like

How do I change the leds to be more like alexa.

When you want to tweak your ReSpeaker 4mic array yourself a good starting point is the wiki: http://wiki.seeedstudio.com/ReSpeaker_4_Mic_Array_for_Raspberry_Pi/#features
and you maybe want to look into the LED pixel ring library: https://github.com/respeaker/pixel_ring

It is on the ToDo list and there is already an issue created for it;

There is a simple call already mentioned there. I believe if you add that call

pixel_ring.change_pattern('echo')

at line 36 of init.py it should work as quick and dirty work around.

Example;

pixel_ring.set_brightness(10)
pixel_ring.change_pattern('echo')
pixel_ring.wakeup()

Thanks I will try that.

Ok, let us know if it works.

Hi! Could you please tell me if the kit subject of this thread is exactly this one?

Yes indeed, but the 6mic circular uses the same drivers so should also work

@j1nx Thanks for the quick reply. I have just acquired a Raspberry PI 4B and installed Picrocft without any trouble (except for not being able to get any microphone to work). I then ordered the Respeaker with 4-mic. Upon booting with the mic board installed, the system recognized the new hardware and went into a very lengthy process of downloading and installing software followed by a reboot. However, after all that, the mic did not work. I have used the mycroft-setup-wizard to select the HAT mic but even there the test never succeeds.

Any suggestion on how to debug this? Any posts/forums anywhere else where this problem was discussed?

This probably won’t help but I mention it anyway. I did not enable SPI on my Raspberry yet but 7 out of the 12 LEDs lit up red.

I believe the spi is for the mic

Gpio is for the leds

I enabled SPI following the instructions at the top but still no luck. The relevant lines in dmesg are:

[    8.527164] matrixio_core: loading out-of-tree module taints kernel.
...
[   10.147086] matrixio-mic matrixio-mic: DMA mask not set
[   10.147256] matrixio-mic matrixio-mic: MATRIXIO mic array audio driver loaded (IRQ=57)
[   10.147675] matrixio-playback matrixio-playback: DMA mask not set
[   10.148113] matrixio-codec matrixio-codec: DMA mask not set
[   10.148472] matrixio-codec matrixio-codec: snd-soc-dummy-dai <-> matrixio-mic.0 mapping ok
[   10.148583] matrixio-codec matrixio-codec: snd-soc-dummy-dai <-> matrixio-pcm-out.0 mapping ok
[   10.150144] matrixio-gpio matrixio-gpio: DMA mask not set
[   10.150854] matrixio-env matrixio-env: DMA mask not set
[   10.151514] matrixio-imu matrixio-imu: DMA mask not set
...
[   10.786155] matrixio-uart matrixio-uart: DMA mask not set

Do these look similar to the ones everyone else gets?