Mycroft Community Forum

Test your mic outside of Mycroft

Hey, great project! My first post.

Is there a way to change the mic record test:

arecord -d 10 test.wav
So that we may adjust the test for different hz and mono/stereo?

when I run the test i am only able to record a sample as:

Recording WAVE ‘test.wav’ : Unsigned 8 bit, Rate 8000 Hz, Mono

similarly when I run:

aplay test.wav

I get:

Playing WAVE ‘test.wav’ : Unsigned 8 bit, Rate 8000 Hz, Mono

I would like to run this test at 16000hz & 44100hz mono/stereo

Thanks! :slight_smile:

This command uses resources “outside” of mycroft. arecord (ALSA) parecord (Pulse audio sound Server)

Correct me if i’m wrong, the 8k seem to be dictated by your input device. You have to tell Pulse audio to resample your stream using ffmpeg (or other services)
although i don’t expect a noticeable better quality through upsampling.

The linked article expands on some configuration options, that might be interesting in general.

Play it with paplay

hey there, my onboard audio device inputs and out are both 44100hz

Can you specify that hardware? But regardless you have to make some configuration changes.

Thanks for the great community, help, and introduction.
So, it appears I can do this:
arecord -d 10 -f cd -t wav test.wav
and it will record in signed 16-bit little endin, rate 44100hz, stereo

aplay test.wav plays it back as the above.

If you want to stay in alsaland, config asound.conf

Yes, you can specify all the parameters on recording.

arecord -d (duration) -f presetformat -r samplerate -c channels

arecrd -d 3 -f S16_LE -r 16000 -c 1 16khz16bitmono.wav