Skip to content

Commit

Permalink
feat: Samuel's PR suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelLarkin committed Jan 24, 2025
1 parent 194551f commit 5651ada
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
35 changes: 21 additions & 14 deletions everyvoice/tests/regression/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,32 @@

## Preparing the regression training data:

- Download LJ 1.1 from https://keithito.com/LJ-Speech-Dataset/
- Download Sinhala TTS from https://openslr.org/30/
- Download High quality TTS data for four South African languages (af, st, tn,
xh) from https://openslr.org/32
- See [`prep-datasets.sh`](prep-datasets.sh) to see where these datasets are expected to be found.
- Run this to create the regression testing directory structure:
- Download LJ 1.1 from https://keithito.com/LJ-Speech-Dataset/
- Download Sinhala TTS from https://openslr.org/30/
- Download High quality TTS data for four South African languages (af, st, tn,
xh) from https://openslr.org/32
- See [`prep-datasets.sh`](prep-datasets.sh) to see where these datasets are expected to be found.
- Run this to create the regression testing directory structure:

mkdir regress-1 # or any suffix you want
cd regress-1
../prep-datasets.sh
```sh
export ACTIVATE_SCRIPT=$HOME/start-ev.sh
export SGILE_DATASET_ROOT=$HOME/sgile/data

mkdir regress-1 # or any suffix you want
cd regress-1
../prep-datasets.sh
```

## Running the regression tests

On a Slurm cluster:

for dir in regress-*; do
pushd $dir
sbatch ../../regression-test.sh
popd
done
```sh
for dir in regress-*; do
pushd $dir
sbatch ../../regression-test.sh
popd
done
```

Or just use `../../regression-test.sh` directly in the loop if you're not on a cluster.
8 changes: 5 additions & 3 deletions everyvoice/tests/regression/prep-datasets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ get_slice() {

EVERYVOICE_REGRESS_ROOT=$(python -c 'import everyvoice; print(everyvoice.__path__[0])')/tests/regression

LJ_SPEECH_DATASET=$HOME/sgile/data/LJSpeech-1.1
SGILE_DATASET_ROOT=${SGILE_DATASET_ROOT:-$HOME/sgile/data}

LJ_SPEECH_DATASET=$SGILE_DATASET_ROOT/LJSpeech-1.1
LJSLICES="150 600 1600 full"
for slice in $LJSLICES; do
dir=regress-lj-$slice
Expand All @@ -34,7 +36,7 @@ Boo!
echo spec > "$dir"/test2.txt
done

SinhalaTTS=$HOME/sgile/data/SinhalaTTS
SinhalaTTS=$SGILE_DATASET_ROOT/SinhalaTTS
dir=regress-si
mkdir $dir
ln -s "$SinhalaTTS/wavs" $dir/
Expand All @@ -51,7 +53,7 @@ cat <<'==EOF==' > "$dir"/test.txt
==EOF==
echo "අක-ෂර" > "$dir"/test2.txt

isiXhosa=$HOME/sgile/data/OpenSLR32-four-South-Afican-languages/xh_za/za/xho
isiXhosa=$SGILE_DATASET_ROOT/OpenSLR32-four-South-Afican-languages/xh_za/za/xho
dir=regress-xh
mkdir $dir
ln -s "$isiXhosa/wavs" $dir/
Expand Down
2 changes: 1 addition & 1 deletion everyvoice/tests/regression/regression-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# User env config -- set ACTIVATE_SCRIPT to point to something that will activate the
# right Python environment, or leave it empty if you don't need it.
ACTIVATE_SCRIPT=$HOME/start_ev.sh
ACTIVATE_SCRIPT=${ACTIVATE_SCRIPT:-$HOME/start_ev.sh}

# Run a command, logging it first
r() {
Expand Down

0 comments on commit 5651ada

Please sign in to comment.