A while ago I created a Mycroft A.I. skill for the ReSpeaker 4-Mic array HAT. It was originally only published on their skill-feedback section, however since I pushed a couple of changes a few days ago and I am not able to test it myself because of a possible hardware failure, I thought I share it here as well. Perhaps someone can pick it up, test, tweak, adjust, etc.
With the PR from the user “tgru”, which solves a stupid typo mistake, he confirms the skill does now work. The default LED pattern is the one mimicking Google. There is also a Alexa pattern. withing the library, however switching to it and the creation of a Mycroft BLUE pattern is on the ToDo list for the skill. Anyhow, here it goes…
ReSpeaker 4-Mic Array HAT Mycroft A.I. Skill.
This skill is to enable and control the Seeed – ReSpeaker 4-Mic Array for Raspberry Pi. ReSpeaker 4-Mic Array for Raspberry Pi is a quad-microphone expansion board for Raspberry Pi designed for AI and voice applications and provides a super cool LED ring, which contains 12 APA102 programable LEDs.
DISCLAIMER: At the moment this is NOT tested by me (as of yet), but as multiple people asked for a ReSpeaker 4-Mic Array HAT skill in the past, already created this topic to open the dialogue and possible feedback / testing.
CREDITS: ALL credits go to @Dominik as he created the almost exact same skill for the ReSpeaker Core V2. I only changed some small code to flip the library used (pixel-ring) to use the 4-Mic Array instead.
How to install respeaker-4mic-hat-skill
SSH into your Mycroft, then;
mycroft-msm install https://github.com/j1nx/respeaker-4mic-hat-skill.git
Or when you already have the .VENV activated or run MycroftOS;
msm install https://github.com/j1nx/respeaker-4mic-hat-skill.git
In case the requirements are not installed automatically you must perform the following;
mycroft-pip install pixel-ring gpiozero
Or again when you have the .VENV activated;
pip install pixel-ring gpiozero
Or running MycroftOS;
sudo pip install pixel-ring gpiozero
Turn on SPI on the Raspberry Pi
To make sure the RPi can control the LEDs, you need to enable SPI;
For Raspbian based systems (Picroft)
sudo raspi-config<br> Go to “Interfacing Options”<br> Go to “SPI”<br> Enable SPI<br> Exit raspi-config<br> reboot
Manually Edit the file config.txt on the boot partition of your Raspberry Pi Make sure the following content is there;
The user running Mycroft need to have permission to access the gpio. If you run MycroftOS this is already been taken care of. If you run pPiCroft or any other distro you most likely need one of the following commands
sudo usermod -g gpio mycroft
sudo usermod -g gpio pi
For good practice I would reboot the device, just in case. And that should be it. The four google color type of LED’s should light up when the wake word is picked up. The four LED’s will spin, giving you the answer.