diff --git a/src/.config/fish/aliases.fish b/src/.config/fish/aliases.fish index 6ed1e58..06ef3ea 100644 --- a/src/.config/fish/aliases.fish +++ b/src/.config/fish/aliases.fish @@ -41,6 +41,8 @@ alias units='units -H ""' alias sxiv='nsxiv' # music recognition +# an alternative is available at ~/.local/bin/msrec +# which uses a different service function musrec # if file exists if test -e $argv diff --git a/src/.local/bin/msrec b/src/.local/bin/msrec new file mode 100755 index 0000000..e811cd6 --- /dev/null +++ b/src/.local/bin/msrec @@ -0,0 +1,69 @@ +#!/bin/sh +# https://docs.acrcloud.com/reference/identification-api + +# put your access key and access secret on two lines in ~/.config/acr_token +# usage: +# +# msrec file.mp4 +# + +set -e + +TMPF="$(mktemp --suffix .mp3)" + +ffmpeg -y -i $1 "$TMPF" + +c=`cat <