Last active
March 28, 2016 22:35
-
-
Save n1zzo/823fa56d9774bdfca55f to your computer and use it in GitHub Desktop.
Record audio from your browser using pulseaudio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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