Created
July 13, 2016 13:36
-
-
Save jmcarbo/057a328565045695b045ba8b430635a9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
#This script require sox | |
#sudo apt-get install sox | |
TIME=$(date +%d-%b-%y_%H%M-%Z) | |
# Get sink monitor: | |
MONITOR=$(pactl list | grep -A2 '^Source #' | \ | |
grep 'Name: .*\.monitor$' | awk '{print $NF}' | tail -n1) | |
# Record it raw, and convert to a wav | |
echo "Recording. Ctrl-C or close window to stop" | |
parec -d "$MONITOR" | sox -v 5.0 -t raw -r 44100 -e signed-integer -Lb 16 -c 2 -V3 - Taped_Recording_$TIME.wav silence 1 3.0 0.1% 1 0.3 0.1% : newfile : restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment