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 on Ubuntu 20.04 Focal Fossa
How to test microphone on Ubuntu 20.04 Focal Fossa

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
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

  1. Open up Settings window and click on the Sound tab. Search for Input Device.
  2. 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.

SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


Test microphone from command line

  1. 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
    
  2. 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 in card 1 and device 0 from the arecord -l output in the previous step.
  3. Now confirm that the microphone recorded correctly your audio input by using aplay:
    # aplay /tmp/test-mic.wav
    
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions