This repository contains the framework for training speaker verification model described in [2]
with score normalization post-processing described in [3].
pip install -r requirements.txt
- Generate train, validate list (if ratio == -1, take 3 files for each speaker for validate)
python src/dataprep.py --generate --split_ratio -1 --config yaml/configuration.yaml
In addition to the Python dependencies, wget
and ffmpeg
must be installed on the system.
Set cuda usage
export CUDA_VISIBLE_DEVICES=5
then add the device="cuda:5" to args
Single GPU
CUDA_VISIBLE_DEVICES=0 python main.py --do_train --config yaml/configuration.yaml
Data parallel
CUDA_VISIBLE_DEVICES=0,1,2 python main.py --do_train --config yaml/configuration.yaml --data_parallel
Distributed
CUDA_VISIBLE_DEVICES=0,1,2 python main.py --do_train --config yaml/configuration.yaml --distributed --mixedprec --distributed_backend nccl --port 10001
Note: the best model is automatically saved during the training process, if the initial_model is not provided, automatically load from the best_state weight if possible. add --augment to train with augment data
- prepare cohorts
CUDA_VISIBLE_DEVICES=0 python main.py --do_infer --prepare --config yaml/configuration.yaml
- Evaluate and tune thresholds
CUDA_VISIBLE_DEVICES=0 python main.py --do_infer --eval --config yaml/configuration.yaml
- Run on Test set
CUDA_VISIBLE_DEVICES=0 python main.py --do_infer --test --config yaml/configuration.yaml
[1] In defence of metric learning for speaker recognition
@inproceedings{chung2020in,
title={In defence of metric learning for speaker recognition},
author={Chung, Joon Son and Huh, Jaesung and Mun, Seongkyu and Lee, Minjae and Heo, Hee Soo and Choe, Soyeon and Ham, Chiheon and Jung, Sunghwan and Lee, Bong-Jin and Han, Icksang},
booktitle={Interspeech},
year={2020}
}
[2] Clova baseline system for the VoxCeleb Speaker Recognition Challenge 2020
@article{heo2020clova,
title={Clova baseline system for the {VoxCeleb} Speaker Recognition Challenge 2020},
author={Heo, Hee Soo and Lee, Bong-Jin and Huh, Jaesung and Chung, Joon Son},
journal={arXiv preprint arXiv:2009.14153},
year={2020}
}