move to /rust-whisper.d with a download_models.sh
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,7 @@
|
||||
**/*.sw*
|
||||
/whisper-cpp-2023/rust.d/target
|
||||
/rust-whisper.d/target
|
||||
/rust-whisper.d/models
|
||||
snowboy-2022/snowboy
|
||||
**/*.git.d
|
||||
**/*.wav
|
||||
|
||||
10
rust-whisper.d/download_models.sh
Executable file
10
rust-whisper.d/download_models.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
src="https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml"
|
||||
d="${1:-"$PWD"/models}"
|
||||
mkdir -p "$d"
|
||||
|
||||
# Whisper models
|
||||
for model in "tiny.en" "base.en" "small.en" "medium.en"; do
|
||||
test -f "$d"/ggml-$model.bin || wget --quiet --show-progress -O "$d"/ggml-$model.bin "$src-$model.bin"
|
||||
done
|
||||
@@ -5,7 +5,7 @@ if [ ! -d ./git.d/.git ]; then
|
||||
fi
|
||||
|
||||
cd ./git.d
|
||||
if [ ! -f ./samples/gb1.wav ]; then
|
||||
if [ ! -f ./samples/jfk.wav ]; then
|
||||
make samples
|
||||
fi
|
||||
if [ ! -f ./main ]; then
|
||||
@@ -20,5 +20,5 @@ fi
|
||||
if [ -n "$STREAM" ]; then
|
||||
./stream -m ./models/ggml-${MODEL:-tiny.en}.bin -t 8 --step 500 --length ${MIC_TIMEOUT:-2}000 $(test -n "$MIC_ID" && echo -c "$MIC_ID")
|
||||
else
|
||||
time ./main -m ./models/ggml-${MODEL:-tiny.en}.bin -f ./samples/gb1.wav -t 4
|
||||
time ./main -m ./models/ggml-${MODEL:-tiny.en}.bin -f ./samples/jfk.wav -t 4
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user