Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WAV="$1"
- if [ -z "$WAV" ]; then
- echo "Usage: $0 OUTPUT.WAV" >&2
- exit 1
- fi
- rm -f "$WAV"
- # 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 to $WAV ..."
- echo "Ctrl-C or Close this window to stop"
- parec -d "$MONITOR" | sox -t raw -r 44100 -sLb 16 -c 2 - "$WAV"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement