1 diff --git a/models/download-ggml-model.sh b/models/download-ggml-model.sh
2 index 1f1075b..7476c8e 100755
3 --- a/models/download-ggml-model.sh
4 +++ b/models/download-ggml-model.sh
5 @@ -12,18 +12,6 @@ pfx="resolve/main/ggml"
9 -# get the path of this script
11 - if [ -x "$(command -v realpath)" ]; then
12 - dirname "$(realpath "$0")"
14 - _ret="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit ; pwd -P)"
19 -models_path="${2:-$(get_script_path)}"
24 @@ -64,8 +52,8 @@ list_models() {
28 -if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
29 - printf "Usage: %s <model> [models_path]\n" "$0"
30 +if [ "$#" -ne 1 ]; then
31 + printf "Usage: %s <model>\n" "$0"
33 printf "___________________________________________________________\n"
34 printf "${BOLD}.en${RESET} = english-only ${BOLD}-q5_[01]${RESET} = quantized ${BOLD}-tdrz${RESET} = tinydiarize\n"
35 @@ -94,8 +82,6 @@ echo "$model" | grep -q '^"tdrz"*$'
37 printf "Downloading ggml model %s from '%s' ...\n" "$model" "$src"
39 -cd "$models_path" || exit
41 if [ -f "ggml-$model.bin" ]; then
42 printf "Model %s already exists. Skipping download.\n" "$model"
44 @@ -116,7 +102,7 @@ if [ $? -ne 0 ]; then
48 -printf "Done! Model '%s' saved in '%s/ggml-%s.bin'\n" "$model" "$models_path" "$model"
49 +printf "Done! Model '%s' saved in 'ggml-%s.bin'\n" "$model" "$model"
50 printf "You can now use it like this:\n\n"
51 -printf " $ ./main -m %s/ggml-%s.bin -f samples/jfk.wav\n" "$models_path" "$model"
52 +printf " $ whisper-cpp -m ggml-%s.bin -f samples/jfk.wav\n" "$model"