try distil-whisper
parent
91c7791860
commit
e3a7628acf
|
|
@ -0,0 +1,31 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -ueo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$(realpath "$BASH_SOURCE")")"
|
||||||
|
|
||||||
|
if git lfs 2>&1 | grep not.a.git; then
|
||||||
|
brew install git-lfs
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "https://github.com/ggerganov/whisper.cpp/pull/1424" >&2
|
||||||
|
if ! test -d ./whisper; then
|
||||||
|
git clone https://github.com/openai/whisper
|
||||||
|
fi
|
||||||
|
if ! test -d ./whisper.cpp; then
|
||||||
|
git clone https://github.com/ggerganov/whisper.cpp
|
||||||
|
fi
|
||||||
|
cd ./whisper.cpp/models
|
||||||
|
|
||||||
|
for name in distil-medium.en; do # distil-large-v2
|
||||||
|
if ! test -d ./$name; then
|
||||||
|
git clone https://huggingface.co/distil-whisper/$name
|
||||||
|
fi
|
||||||
|
cd ./$name
|
||||||
|
git lfs install
|
||||||
|
git lfs pull
|
||||||
|
git lfs install
|
||||||
|
cd ..
|
||||||
|
python3 ./convert-h5-to-ggml.py ./$name/ ../../whisper .
|
||||||
|
mv ./ggml-model.bin ../../ggml-$name.bin
|
||||||
|
done
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
src="https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml"
|
src="https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml"
|
||||||
d="${1:-"$PWD"/models}"
|
cd "$(dirname "$(realpath "$BASH_SOURCE")")"
|
||||||
mkdir -p "$d"
|
|
||||||
|
|
||||||
# Whisper models
|
# Whisper models
|
||||||
for model in "tiny.en" "base.en" "small.en" "medium.en"; do
|
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"
|
test -f ./ggml-$model.bin || wget --quiet --show-progress -O ./ggml-$model.bin "$src-$model.bin"
|
||||||
done
|
done
|
||||||
Loading…
Reference in New Issue