forked from huggingface/open_asr_leaderboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_whisper.sh
executable file
·92 lines (78 loc) · 2.78 KB
/
run_whisper.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
export PYTHONPATH="..":$PYTHONPATH
MODEL_IDs=("openai/whisper-tiny.en" "openai/whisper-small.en" "openai/whisper-base.en" "openai/whisper-medium.en" "openai/whisper-large" "openai/whisper-large-v2" "openai/whisper-large-v3" "distil-whisper/distil-medium.en" "distil-whisper/distil-large-v2" "distil-whisper/distil-large-v3" "nyrahealth/CrisperWhisper")
BATCH_SIZE=64
num_models=${#MODEL_IDs[@]}
for (( i=0; i<${num_models}; i++ ));
do
MODEL_ID=${MODEL_IDs[$i]}
python run_eval.py \
--model_id=${MODEL_ID} \
--dataset_path="hf-audio/esb-datasets-test-only-sorted" \
--dataset="voxpopuli" \
--split="test" \
--device=0 \
--batch_size=${BATCH_SIZE} \
--max_eval_samples=-1
python run_eval.py \
--model_id=${MODEL_ID} \
--dataset_path="hf-audio/esb-datasets-test-only-sorted" \
--dataset="ami" \
--split="test" \
--device=0 \
--batch_size=${BATCH_SIZE} \
--max_eval_samples=-1
python run_eval.py \
--model_id=${MODEL_ID} \
--dataset_path="hf-audio/esb-datasets-test-only-sorted" \
--dataset="earnings22" \
--split="test" \
--device=0 \
--batch_size=${BATCH_SIZE} \
--max_eval_samples=-1
python run_eval.py \
--model_id=${MODEL_ID} \
--dataset_path="hf-audio/esb-datasets-test-only-sorted" \
--dataset="gigaspeech" \
--split="test" \
--device=0 \
--batch_size=${BATCH_SIZE} \
--max_eval_samples=-1
python run_eval.py \
--model_id=${MODEL_ID} \
--dataset_path="hf-audio/esb-datasets-test-only-sorted" \
--dataset="librispeech" \
--split="test.clean" \
--device=0 \
--batch_size=${BATCH_SIZE} \
--max_eval_samples=-1
python run_eval.py \
--model_id=${MODEL_ID} \
--dataset_path="hf-audio/esb-datasets-test-only-sorted" \
--dataset="librispeech" \
--split="test.other" \
--device=0 \
--batch_size=${BATCH_SIZE} \
--max_eval_samples=-1
python run_eval.py \
--model_id=${MODEL_ID} \
--dataset_path="hf-audio/esb-datasets-test-only-sorted" \
--dataset="spgispeech" \
--split="test" \
--device=0 \
--batch_size=${BATCH_SIZE} \
--max_eval_samples=-1
python run_eval.py \
--model_id=${MODEL_ID} \
--dataset_path="hf-audio/esb-datasets-test-only-sorted" \
--dataset="tedlium" \
--split="test" \
--device=0 \
--batch_size=${BATCH_SIZE} \
--max_eval_samples=-1
# Evaluate results
RUNDIR=`pwd` && \
cd ../normalizer && \
python -c "import eval_utils; eval_utils.score_results('${RUNDIR}/results', '${MODEL_ID}')" && \
cd $RUNDIR
done