How to Microphone test on ubuntu
Monday 28 of April 2025
I hate Windows 7 or more (XP is fine). Now I turned all my devices on ubuntu or debian distribution for 2 year and I don't regret it!BUT ! On Windows, you have a simple checkbox to let you heard what a microphone gets. So easy.
On ubuntu this feature is not included in Sound Settings. Thanks to Ankush Das for his post on Itsfoss, there is a command to do that !
I made a script
#!/bin/bash
echo ''
read -p "How long to test the microphone in seconds ? (Type 0 or enter to unlimited) " duration
echo ''
if [ -z "$duration" ] || [ "$duration" -le 0 ]; then
echo 'Turning the script for unlimited time. Type CTRL+C to exit.'
echo ''
arecord -f S16_LE -r 16000 -B 1 | aplay
fi
echo 'Running the test for ' + $duration + ' seconds'
arecord -f S16_LE -r 16000 -B 1 -d $duration | aplay
I'll update if I make some changes.
Hope I've helped someone!
Comments