The objective of this tutorial is to show the reader a quick-start method of testing a microphone on Ubuntu 20.04 Focal Fossa.
In this tutorial you will learn:
- How to test microphone from GNOME
- How to test microphone from command line
Software Requirements and Conventions Used
Category | Requirements, Conventions or Software Version Used |
---|---|
System | Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa |
Software | N/A |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions |
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
How to test microphone on Ubuntu 20.04 step by step instructions
Test microphone from GUI GNOME desktop
- Open up
Settings
window and click on theSound
tab. Search forInput Device
. - Select an appropriate device and start speaking to the selected microphone. The orange bars below the device name should start flashing as a result of your audio input.
Test microphone from command line
- First, step is to list all avaiable microphone devices. Open up your terminal window and enter the following command:
$ sudo arecord -l **** List of CAPTURE Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 2: ALC662 rev3 Alt Analog [ALC662 rev3 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Q9000 [QuickCam Pro 9000], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0
- Next record a short 10 seconds audio by using the following command:
$ sudo arecord -f S16_LE -d 10 -r 16000 --device="hw:1,0" /tmp/test-mic.wav
In the above example we have recorded audio via microphone using the QuickCam Pro 9000 as specified by
--device="hw:1,0"
as incard 1
anddevice 0
from thearecord -l
output in the previous step. - Now confirm that the microphone recorded correctly your audio input by using
aplay
:# aplay /tmp/test-mic.wav