mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 18:45:19 +03:00
ea39f209ca
Co-authored-by: Max Howell <mxcl@me.com>
33 lines
547 B
C++
Executable file
33 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
|