sasv-joint-optimisation
This repository provides codes to reproduce our papers on joint optimisation of speaker verification and spoofing countermeasure systems.
The corresponding papers are On the potential of jointly-optimised solutions to spoofing attack detection and automatic speaker verification accepted to IberSPEECH 2022 and Can spoofing countermeasure and speaker verification systems be jointly optimised? accepted to ICASSP 2023.
Notes
Codes to our ICASSP 2023 paper "Can spoofing countermeasure and speaker verification systems be jointly optimised?" will be uploaded soon.
(July 10, 2023) We've uploaded the pre-trained models and score files used in our experiment in here. Please notice that due to storage limit, only the best performing model of each configuration is uploaded.
(July 10, 2023, two hours later) We've uploaded the codes for the ICASSP paper. For experiments related to FAD database, please first download the data from here, convert all .wav files under 'FAD/train/real/aishell3/'
and 'FAD/train/fake/'
to .flac and copy them to '/path/to/your/LA/ASVspoof2019_LA_train/flac/'
.
Getting started
Codes were tested using a GeForce RTX 3090 GPU with CUDA Version==11.2. Please try to install the dependencies first:
conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge
Then:
pip install -r requirements.txt
Dataset
The ASVspoof 2019 database can be downloaded from here.
Please change the database
defined in each .conf
file from '/path/to/your/LA/'
to its actual path.
The FAD database can be downloaded from here, please read the notes for arranging the database.
Training
To jointly-optimise the ASV and CM sub-systems:
python main.py --config ./configs/ResNetSE34V2_AASIST_OC.conf
To train a back-end classifier and keep ASV and CM fixed:
python main.py --config ./configs/ResNetSE34V2_AASIST_OC_fixed.conf
Pre-trained models
The pre-trained models are uploaded here. You can try to calculate the evaluation score by:
python save_sasv_score.py
And for the scores of ASV sub-system, please first try:
python save_asv_embeddings.py --model=path/to/your/pre_trained_model.ckpt --comment="conf1"
then
python save_asv_score.py --comment="conf1"
For the scores of CM sub-system, please try:
python save_cm_score.py --model=path/to/your/pre_trained_model.ckpt --comment="conf1"
References
If you find this repository useful, please consider citing:
@inproceedings{sasv_joint_vol1,
author={Wanying Ge and Hemlata Tak and Massimiliano Todisco and Nicholas Evans},
title={{On the potential of jointly-optimised solutions to spoofing attack detection and automatic speaker verification}},
year=2022,
booktitle={Proc. IberSPEECH 2022},
pages={51--55},
}
and
@inproceedings{sasv_joint_vol2,
author={Wanying Ge and Hemlata Tak and Massimiliano Todisco and Nicholas Evans},
title={{Can spoofing countermeasure and speaker verification systems be jointly optimised?}},
year=2023,
booktitle={Proc. ICASSP 2023},
}
Acknowledgements
Codes are based on the implementations of SASVC2022_Baseline, voxceleb_trainer, aasist and AIR-ASVspoof.