Mercurial > repos > other > usr-local-bin
view record-audio @ 29:c2584db4a650
Make load recording more flexible and efficient
* Works with variable number of CPUs
* Use Python `enumerate()` function where possible
* Use long-running NVidia function
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 30 Dec 2020 17:22:29 +0000 |
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"