updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / outrec-workalike / outrec-workalike.sh
blobac884c9bcc9968a675634ba397c99cd47b7965d7
1 #!/bin/bash
2 TIME=$(date +%Y.%m.%d.%H.%M.%S)
3 OUTPUTFILE=/tmp/Recorded_Sound_$TIME.wav
4 MONITOR=$(pactl list | grep -A2 '^Source #' | grep 'Name: .*\.monitor$' | awk '{print $NF}' | tail -n1)
5 echo "Recording to $OUTPUTFILE, press Ctrl-C or close this window to stop ..."
6 parec -d "$MONITOR" | sox -t raw -r 44100 -sLb 16 -c 2 - $OUTPUTFILE