|
| 1 | +# whisper.cpp/tests/earnings21 |
| 2 | + |
| 3 | +[Earnings-21](https://arxiv.org/abs/2104.11348) is a real-world benchmark |
| 4 | +dataset that contains 39-hours of long-form English speech, sourced from |
| 5 | +public earning calls. |
| 6 | + |
| 7 | +This directory contains a set of scripts to evaluate the performance of |
| 8 | +whisper.cpp on Earnings-21 corpus. |
| 9 | + |
| 10 | +## Quick Start |
| 11 | + |
| 12 | +1. (Pre-requirement) Compile `whisper-cli` and prepare the Whisper |
| 13 | + model in `ggml` format. |
| 14 | + |
| 15 | + ``` |
| 16 | + $ # Execute the commands below in the project root dir. |
| 17 | + $ cmake -B build |
| 18 | + $ cmake --build build --config Release |
| 19 | + $ ./models/download-ggml-model.sh tiny |
| 20 | + ``` |
| 21 | + |
| 22 | + Consult [whisper.cpp/README.md](../../README.md) for more details. |
| 23 | + |
| 24 | +2. Download the audio files. |
| 25 | + |
| 26 | + ``` |
| 27 | + $ make get-audio |
| 28 | + ``` |
| 29 | + |
| 30 | +3. Set up the environment to compute WER score. |
| 31 | + |
| 32 | + ``` |
| 33 | + $ pip install -r requirements.txt |
| 34 | + ``` |
| 35 | + |
| 36 | + For example, if you use `virtualenv`, you can set up it as follows: |
| 37 | + |
| 38 | + ``` |
| 39 | + $ python3 -m venv venv |
| 40 | + $ . venv/bin/activate |
| 41 | + $ pip install -r requirements.txt |
| 42 | + ``` |
| 43 | + |
| 44 | +4. Run the benchmark test. |
| 45 | + |
| 46 | + ``` |
| 47 | + $ make |
| 48 | + ``` |
| 49 | + |
| 50 | +## How-to guides |
| 51 | + |
| 52 | +### How to change the inference parameters |
| 53 | + |
| 54 | +Create `eval.conf` and override variables. |
| 55 | + |
| 56 | +``` |
| 57 | +WHISPER_MODEL = large-v3-turbo |
| 58 | +WHISPER_FLAGS = --no-prints --threads 8 --language en --output-txt |
| 59 | +``` |
| 60 | + |
| 61 | +Check out `eval.mk` for more details. |
| 62 | + |
| 63 | +### How to perform the benchmark test on a 10-hour subset |
| 64 | + |
| 65 | +Earnings-21 provides a small but representative subset (approximately |
| 66 | +10-hour audio data) to evaluate ASR systems quickly. |
| 67 | + |
| 68 | +To switch to the subset, create `eval.conf` and add the following line: |
| 69 | + |
| 70 | +``` |
| 71 | +EARNINGS21_EVAL10 = yes |
| 72 | +``` |
| 73 | + |
| 74 | +### How to run the benchmark test using VAD |
| 75 | + |
| 76 | +First, you need to download a VAD model: |
| 77 | + |
| 78 | +``` |
| 79 | +$ # Execute the commands below in the project root dir. |
| 80 | +$ ./models/download-vad-model.sh silero-v5.1.2 |
| 81 | +``` |
| 82 | + |
| 83 | +Create `eval.conf` with the following content: |
| 84 | + |
| 85 | +``` |
| 86 | +WHISPER_FLAGS = --no-prints --language en --output-txt --vad --vad-model ../../models/ggml-silero-v5.1.2.bin |
| 87 | +``` |
0 commit comments