How to capture with alsa is here discussed: https://forum.puppylinux.com/viewtopic.php?t=6083
This is for when running the system with PulseAudio, run below script from terminal to capture "what you hear", a file "record.mp3" @192 will be created (depends on lame) :
Code: Select all
#!/bin/bash
SoundFile=~/record.mp3
#rm -f "$SoundFile" # remove previous (uncomment) or not
trap 'killall parec' EXIT
# Get sink monitor:
MONITOR=$(pactl list | egrep -A2 '^(\*\*\* )?Source #' | grep 'Name: alsa.*\.monitor$' | awk '{print $NF}' | tail -n1)
echo "set-source-mute ${MONITOR} false" | pacmd >/dev/null
echo "Start the audio player ..."
read -p "Press Enter to start capturing: "
echo "Stop with Ctrl-C ..."
echo "Recording..."
parec -d "$MONITOR" | lame -r -q 3 --lowpass 17 --abr 192 - "$SoundFile"