Hi there,
It’s probably something quite simple but I can’t quite grasp the issue. Long story short, I’ve built a container based app running with priviledges which captures the microphones and outputs to a pipe. Essentially it’s based on the example available here: https://github.com/matrix-io/matrix-hal-examples/blob/master/microphone_array/mic_record_pipe.cpp
The issue is that the sound is just plain awful. It’s full of crackling and can’t figure what next I could tweak.
The code is available here: https://10lab.visualstudio.com/athena/_git/athena.pi.voicerecorderapp
The container is started using this command:
pi@pi:~/ $ docker run -d --privileged --restart always -v $PWD/config:/usr/src/app/.config -v /tmp:/tmp -e SAMPLING_RATE=96000 -e GAIN=0 -e DEBUG=INFO:*,ERROR:*,--not-this --network host efogcontainers.azurecr.io/athena_pi_micpipes-run:20190221.15
Sample files can be obtained here:
[https://saathenaiotpicdne.blob.core.windows.net/matrix/mic7-music-96khz-16bits.wav](96khz 16bits)
[https://saathenaiotpicdne.blob.core.windows.net/matrix/mic7-music-96khz-8bits.wav](96khz 8bits)
Notice the 8bits 96khz is closer to the real thing however the crackling is unbearable.
The mic data is captured using a simple tail:
pi@pi:~/ $ tail -f /tmp/m_matrix_micarray_channel_7 > music.raw
pi@pi:~/ $ sox -r 96000 -e unsigned -b 8 -c 1 music.raw music.wav
pi@pi:~/ $ docker logs happy_noyce
0 [0x76fa6220] INFO athena_pi_voicerecorderapp null - Voice Recording App Started.
* Debug setting up
INFO: [/dev/spidev0.0] was opened
* Debug configured bus
* Debug setting sampling rate 96000
* Debug setting gain 7
unable to create /tmp/m_matrix_micarray_channel_0 FIFO.
Audio Configuration:
Sampling Frequency: 96000
Gain : 7
* Debug finished setup 0
* Debug starting up
Can any of you give me some pointer on what’s going on? I would like to be able to capture a somewhat clean audio without crackling. Is there something I’ve missed?
Regards,
Étienne