504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
diff --git a/models/download-ggml-model.sh b/models/download-ggml-model.sh
|
|
index 749b409..831f4c0 100755
|
|
--- a/models/download-ggml-model.sh
|
|
+++ b/models/download-ggml-model.sh
|
|
@@ -9,18 +9,6 @@
|
|
src="https://huggingface.co/ggerganov/whisper.cpp"
|
|
pfx="resolve/main/ggml"
|
|
|
|
-# get the path of this script
|
|
-function get_script_path() {
|
|
- if [ -x "$(command -v realpath)" ]; then
|
|
- echo "$(dirname "$(realpath "$0")")"
|
|
- else
|
|
- local ret="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)"
|
|
- echo "$ret"
|
|
- fi
|
|
-}
|
|
-
|
|
-models_path="$(get_script_path)"
|
|
-
|
|
# Whisper models
|
|
models=(
|
|
"tiny.en"
|
|
@@ -82,8 +70,6 @@ fi
|
|
|
|
printf "Downloading ggml model $model from '$src' ...\n"
|
|
|
|
-cd "$models_path"
|
|
-
|
|
if [ -f "ggml-$model.bin" ]; then
|
|
printf "Model $model already exists. Skipping download.\n"
|
|
exit 0
|
|
@@ -105,7 +91,7 @@ if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
|
|
-printf "Done! Model '$model' saved in 'models/ggml-$model.bin'\n"
|
|
+printf "Done! Model '$model' saved in 'ggml-$model.bin'\n"
|
|
printf "You can now use it like this:\n\n"
|
|
-printf " $ ./main -m models/ggml-$model.bin -f samples/jfk.wav\n"
|
|
+printf " $ whisper-cpp -m ggml-$model.bin -f samples/jfk.wav\n"
|
|
printf "\n"
|