annotate record-audio @ 3:29dc6ad8d8ac

Update path for temporary photos (ones not yet catalogued/checked for being poor)
author IBBoard <dev@ibboard.co.uk>
date Sun, 09 Nov 2014 09:27:24 +0000
parents e85e3470a41e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 #! /bin/bash
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 WAV="$1"
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 if [ -z "$WAV" ]; then
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 echo "Usage: $0 OUTPUT.WAV" >&2
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 exit 1
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 fi
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 rm -f "$WAV"
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 MONITOR=$(pactl list | grep -A2 '^Source #' | \
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 grep 'Name: .*\.monitor$' | awk '{print $NF}' | tail -n1)
e85e3470a41e Initial commit of useful scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 parec -d "$MONITOR" | sox -t raw -r 44100 -Lb 16 -e signed-integer -c 2 - "$WAV"