9.3 Audio Microphone Test

20221005

A quick way to test the microphone is to run audacity. Once started click the record button (the red dot) and start talking.

We can also test the microphone from the command line using arecord. First, list the recognised soundcards and digital audio devices with --list-devices or -l for short.

$ arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC285 Analog [ALC285 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: USB [ThinkPad Thunderbolt 3 Dock USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Now record for 5 seconds using --duration=5 (or -d) from one identified device using --device="hw:1,0" (card 1 device 0).

$ arecord --duration=5 --device="hw:1,0" -f S16_LE -r 16000 /tmp/test-mic.wav

To listen to the recording:

$ aplay /tmp/test-mic.wav


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0