I just got my Matrix Voice and soon after the initial setup ran into issues with frequency range and sampling rate. Please excuse my ignorance if I missed something obvious since I am new to this.
1) Audio recorded with arecord at 48kHz sampling rate:
arecord -c 8 -f S16_LE -r 48000 -d 5 fs48000.wav
- Recorded audio doesn’t contain frequencies above 15kHz. This is clearly visible in the spectrogram here:
- Why are no frequencies above 15kHz present in the recording? The MP34DB02 mems microphones used by Matrix Voice have the frequency range of 20Hz-20kHz according to this datasheet (see 2.3 Frequency response paragraph).
2) Audio recorded with arecord at 96kHz sampling rate:
arecord -c 8 -f S16_LE -r 96000 -d 5 fs96000.wav
- The “overrun” warnings are often reported during recording:
Recording WAVE ‘fs96000.wav’ : Signed 16 bit Little Endian, Rate 96000 Hz, Channels 8
overrun!!! (at least 0.939 ms long)
overrun!!! (at least 0.960 ms long)
- Similarly as when using the 48kHz sample rate, frequencies above 15kHz are not present in the recording.
- The recorded audio contains crackling noises not present in the original audio.
- What do the “overrun” warnings indicate?
- Is sampling rate of 96kHz supported at all? According to https://matrix-io.github.io/matrix-documentation/matrix-voice/resources/microphone/ and Current Audio recording Sampling Rate Supported by Matrix Creator board it is supported, but according to Matrix Creator Microphone issues it is not. Could you please clarify.
3) Audio recorded with mic_record_file (from matrix-hal-examples) at 48kHz sampling rate:
matrix-hal-examples/build/microphone_array/mic_record_file --duration 5 --sampling_frequency 48000
- Audible crackling noise can be heard every second.
- Frequencies above 1700Hz are mostly not present in the recording, except of a spike at 15kHz. This is clearly visible in the attached spectrogram:
- After I finished recording with
mic_record_file, it was not possible to use
arecordany more, because the latter reported the following error: arecord: main:788: audio open error: Device or resource busy
- Why are only frequencies up to 1700Hz present in the recording?
- What causes the crackling noises every second? In
mic_record_file.cppI see a loop running a new iteration each time the sampling rate number of samples is recorded (i.e. every second), but I still don’t understand how this causes the crackling noises.
- Would it be possible to update the
mic_record_file.cppto properly close the grabbed resources to get rid of the Device or resource busy error when subsequently attempting to use
4) Audio recorded with mic_record_file (from matrix-hal-examples) at 96kHz sampling rate:
matrix-hal-examples/build/microphone_array/mic_record_file --duration 5 --sampling_frequency 96000
- The recorded audio was not 5s long at 96kHz, but for 10s long at 48kHz with halved pitch.
- The recorded audio has lots of crackling noise.
- How to update
mic_record_file.cppto fix the issue with duration and pitch?
sox has exactly the same issues as recording with
That’s all for now. Apart from the problems mentioned here, I was very pleased with how smooth the setup of the device was and the quality of the online help and documentation. Thank you for your awesome work!