Hardware Test: Microphones 🎤

Hello Community!!

Here are the steps for troubleshooting microphone issues in both MATRIX Creator and Voice.

For initial setup please follow the steps in the post MATRIX Creator/Voice Hardware Test.

Then, follow the steps below to test the microphones.

1. Recording

Clone and build the HAL examples

# Installing prerequisits
sudo apt-get install cmake g++ git libfftw3-dev wiringpi libgflags-dev
# Clone and build
git clone https://github.com/matrix-io/matrix-creator-hal.git
cd matrix-creator-hal 
mkdir build && cd build
cmake ..

Record audio

cd ~/matrix-creator-hal/build/demos/

After recording you will see these files on the demos folder

$ ls -1 *raw

2. Convert from raw to wav:

sudo apt-get install sox alsa-utils
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_0.raw channel_0.wav
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_1.raw channel_1.wav
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_2.raw channel_2.wav
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_3.raw channel_3.wav
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_4.raw channel_4.wav
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_5.raw channel_5.wav
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_6.raw channel_6.wav
sox -r 16000 -c 1 -e signed -c 1 -e signed -b 16 mic_16000_s16le_channel_7.raw channel_7.wav

3. Check the audio recordings

After this you should see the wav files in the folder. To play the recordings back, you should use the 3.5mm audio jack in the Raspberry Pi if played there. You can play the files using aplay as shown below:

aplay ./channel_0.wav

You could also use an audio software to better diagnose the issue. We recommend using Audacity. See image as a reference:

So far, cases of damaged mics from the factory it’s been very rare. However, we are making this guide to help you to fast diagnose the issue in the case you have it.
If you find noice or any problem in the recordings please contact us at alfred.gonzalez@matrixlabs.ai


Good Tutorial! It should be stickied!

Few additions:
This line is missing in the above tutorial to install the prerequisits

sudo apt-get install cmake g++ git libfftw3-dev wiringpi matrixio-creator-init libgflags-dev

Later it should be

cd demos

as you are already in the folder “build”.

I did the updates to the guide!

Thanks @SpaceGlider .

1 Like

When I typed $ ./micarray_recorder in the folder ~/matrix-creator-hal/build/demos/ , it show me that -bash: ./micarray_recorder: No such file or directory.

Then I found there is a file micarray_recorder_direct, so I typed $ ./micarray_recorder_direct,
but it show me that
INFO: [/dev/spidev0.0] was opened
MATRIX device has not been detected

Why this problem?

Hello @bluegreen,

We should start with the MATRIX Creator/Voice Hardware Test, and then we could check what could be the issue here.

Best Regards,

Kevin Patino

I typed ./micarry_recorder_direct and can be recorded 5 secondes.
I’ve recorded audio and successful convert them from raw to wav.

Buy after I type aplay ./channel_0.wav

There is no sound heard!

Why this problem.


Just silence? Not noice or other sounds?
Can you share the recording wav files so we can take a look to them?



The forum doesn’t authorize .wav file.
This time I run ./micarray_recorder_direct, it showed me use ALSA implementation.How?

hi, does anybody have solution to this problem? i also receive the same error. One user said he had to reinstall everything. Is it possible to fix it without going to scratch?

Doing it from scratch it is probably the easiest and fastest path but if you really can’t do it we can help you.

Can you share the output of :

uname -a
cat /etc/os-release
dpkg -l | grep matrix
lsmod | grep matrix

Can you also share what guide did you follow to setup Alexa?
We have published two guides in Hackster:

We no longer support this first guide.


MyEquipment is matrix voice, respberry 3B+

Do everything as this

problem :

1,DC offset like this

2, noise