pantry/projects/github.com/ggerganov/whisper.cpp/whisper.cpp
Sanchit Ram Arvind ea39f209ca
+whisper.cpp (#1276)
Co-authored-by: Max Howell <mxcl@me.com>
2023-05-04 17:49:17 -03:00

32 lines
547 B
C++
Executable file

#!/bin/sh
set -e
test -n "$VERBOSE" && set -x
D="$(cd "$(dirname "$0")"/.. && pwd)"
VERSION="$(basename "$D")"
MODEL_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/models/whisper"
export PATH="$D/tbin:$PATH"
whisper-fetch "$MODEL_DIR" $VERSION
case $1 in
stream)
shift
exec "$D"/tbin/stream \
--model "$MODEL_DIR"/ggml-base.en.bin \
"$@"
;;
command)
shift
exec "$D"/tbin/command \
--model "$MODEL_DIR"/ggml-base.en.bin \
"$@"
;;
*)
exec "$D"/tbin/main \
--model "$MODEL_DIR"/ggml-base.en.bin \
"$@"
;;
esac