Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial script for automating the creation of a controlled testing en… #2057

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions evaluate_oov.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -e


if [ $# -eq 0 ]; then
echo "\n This script compares the performance of a given AM on both OOV and non-OOV testing sets with the use of an external scorer."
echo "\n It works on the data prepared by oov_lm_prep.sh"
echo -e "\n Usage: \n $0 <am_chechpoint_dir> <scorer> \n"
exit 1
fi

am=$1
scorer=tmp/lm/kenlm.scorer
nj=$(nproc)

mkdir -p tmp/results

echo "Evaluating Using Scorer"

echo "Case (1): Evaluating on OOV testing set."
python -m coqui_stt_training.evaluate --test_files tmp/oov_corpus.csv \
--test_output_file tmp/results/oov_results.json --scorer_path $scorer \
--checkpoint_dir $am --test_batch_size $nj

echo "Case (2): Evaluating on original testing set."
python -m coqui_stt_training.evaluate --test_files tmp/scorer_corpus.csv \
--test_output_file tmp/results/samples.json --scorer_path $scorer \
--checkpoint_dir $am --test_batch_size $nj
Loading