-
-
Save patadejaguar/c9ad9afbf5f253831c196b33729da24d to your computer and use it in GitHub Desktop.
How to record and filter noise from mic in Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Useful links | |
# https://stackoverflow.com/questions/42904441/pipe-sox-play-command-to-stdout | |
# http://www.zoharbabin.com/how-to-do-noise-reduction-using-ffmpeg-and-sox/ | |
# Record some noise | |
sox -t alsa default -b 16 -r 44100 -e signed -t wav - -t wav /tmp/noise.wav | |
# or alternative with arecord | |
arecord -f dat | sox -t wav -b 16 -r 44100 -e signed - -t wav /tmp/noise.wav | |
# Profile noise | |
sox /tmp/noise.wav -n noiseprof /tmp/noise.prof | |
# Play with filtered noise | |
arecord -f dat | sox -t wav -b 16 -r 44100 -e signed - -t wav - noisered /tmp/noise.prof 0.21 | play - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment