Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # README
- # run command to start recording then press Ctrl-C when you want to stop
- # recording. This will create a new file in /tmp/ and then copy its path to
- # your clipboard You can then Ctrl+V to paste it into Anki, which will copy the
- # file to ~/.local/share/Anki2/
- #
- # to find the correct sink, use the following command to get the names of the
- # sinks. You MUST append the suffix ".monitor"
- # pacmd list-sinks | grep -e '^[[:space:]]*name'
- #
- # On ubuntu, you will need to install the prerequisite packages
- # sudo apt install pulseaudio-utils lame
- sink=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
- file=/tmp/audio_$(date "+%Y-%m-%d_%T").mp3
- parec -d $sink | lame -r -V6 - $file
- echo file://$file | xclip -t text/uri-list -selection clipboard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement