Mercurial > repos > other > usr-local-bin
view record-audio @ 23:489ba6ea3c35
Add some more directories to back up
Also reformats the command for readability
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 09 Jun 2019 15:53:48 +0100 |
parents | e85e3470a41e |
children |
line wrap: on
line source
#! /bin/bash WAV="$1" if [ -z "$WAV" ]; then echo "Usage: $0 OUTPUT.WAV" >&2 exit 1 fi rm -f "$WAV" MONITOR=$(pactl list | grep -A2 '^Source #' | \ grep 'Name: .*\.monitor$' | awk '{print $NF}' | tail -n1) parec -d "$MONITOR" | sox -t raw -r 44100 -Lb 16 -e signed-integer -c 2 - "$WAV"