Skip to content

Commit

Permalink
update vox plda recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
wsstriving committed Jul 19, 2023
1 parent 602cfee commit ebfa7d0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
Empty file removed examples/__init__.py
Empty file.
Empty file removed examples/sre/__init__.py
Empty file.
Empty file removed examples/sre/v2/__init__.py
Empty file.
20 changes: 17 additions & 3 deletions examples/voxceleb/v2/local/score_plda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ stop_stage=-1

if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
echo "train the plda model ..."
mkdir -p ${exp_dir}/scores
python wespeaker/bin/train_plda.py \
--exp_dir ${exp_dir} \
--scp_path ${exp_dir}/embeddings/vox2_dev/xvector.scp \
--utt2spk ${data}/vox2_dev/utt2spk \
--indim 256 \
--iter 5 \
--type '2cov'
--iter 5
echo "plda training finished"
fi

Expand All @@ -52,6 +50,22 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
done
fi

if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
echo "apply plda scoring ..."
mkdir -p ${exp_dir}/scores
trials_dir=${data}/vox1/trials
for x in $trials; do
echo "scoring on " $x
python wespeaker/bin/eval_plda.py \
--enroll_scp_path ${exp_dir}/embeddings/vox1/xvector.scp \
--test_scp_path ${exp_dir}/embeddings/vox1/xvector.scp \
--utt2spk <(cat ${data}/vox1/utt2spk | awk '{print $1, $1}') \
--trial ${trials_dir}/${x} \
--score_path ${exp_dir}/scores/${x}.pldascore \
--model_path ${exp_dir}/plda
done
fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "compute metrics (EER/minDCF) ..."
scores_dir=${exp_dir}/scores
Expand Down

0 comments on commit ebfa7d0

Please sign in to comment.