-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun-test.sh
More file actions
27 lines (22 loc) · 650 Bytes
/
run-test.sh
File metadata and controls
27 lines (22 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
TEST_FILES="../test-files/"
waves=($(ls "$TEST_FILES"*.wav))
THREADS=2
MODEL="tiny"
LANG="en" # NOTE: supports "auto"
BEAM_SIZE=1
INIT_PROMPT=""
echo "Using model '$MODEL' with language '$LANG', beam-size=$BEAM_SIZE and $THREADS threads"
if [ ! -z "$INIT_PROMPT" ]; then
echo "Initial prompt: $INIT_PROMPT"
fi
echo ""
cd whisper.cpp
start_t=$(date +"%s.%N")
for wave in ${waves[@]}; do
echo "Transcribing file: ../$wave"
./main -m "models/ggml-${MODEL}.bin" -f "../$wave" -t $THREADS -l $LANG --beam-size $BEAM_SIZE --prompt "$INIT_PROMPT"
echo ""
done
finish_t=$(date +"%s.%N")
echo "Total: $(expr $finish_t-$start_t | bc)s"