Skip to content

Instantly share code, notes, and snippets.

@n1zzo
Last active March 28, 2016 22:35
Show Gist options
  • Save n1zzo/823fa56d9774bdfca55f to your computer and use it in GitHub Desktop.
Save n1zzo/823fa56d9774bdfca55f to your computer and use it in GitHub Desktop.
Record audio from your browser using pulseaudio
#!/bin/sh
# Record audio from browsers - requires sox, pulseaudio-utils
# Get audio stream index
INDEX=$(pacmd <<< "list-sink-inputs" | grep index | cut -d ':' -f 2)
pactl load-module module-null-sink sink_name=recordsink
pactl move-sink-input $INDEX recordsink
parec -d recordsink.monitor | sox -t raw -b 16 -e signed -c 2 -r 44100 - record.flac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment