cli-scripts/scripts/vmemo

19 lines
318 B
Plaintext
Raw Permalink Normal View History

2024-02-29 20:44:48 +00:00
#!/usr/bin/env bash
if [[ -z "$1" ]]; then
duration=15
else
duration=$1
fi
if [[ -z "$2" ]]; then
note="voice_memo"
else
note="${2// /_}"
fi
tmp=$(date +"memo-%Y.%m.%d-%k.%M.%S")
timestamp="${tmp// /}"
filename="$HOME/Recordings/vmemos/${timestamp}-${note}.mp3"
arecord -f U8 -d $duration $filename