mirror of
https://github.com/ivabus/pantry
synced 2024-11-25 09:55:06 +03:00
ea39f209ca
Co-authored-by: Max Howell <mxcl@me.com>
32 lines
547 B
C++
Executable file
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
|