19 lines
318 B
Plaintext
19 lines
318 B
Plaintext
|
#!/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
|