This repository provides a notebook for training and evaluating audio anti-spoofing system ResCapsGuard proposed in 'Capsule-based and TCN-based approaches for spoofing detection in voice biometry'
We train/validate/evaluate ResCapsGuard using the ASVspoof 2019 logical access dataset [1].
Manual preparation is available via
- ASVspoof2019 dataset: https://datashare.ed.ac.uk/handle/10283/3336
- Download
LA.zipand unzip it - Set your dataset and labels directories in the corresponding variables
train_path_flac(dev_path_flac,eval_path_flac) andtrain_label_path(dev_label_path,eval_label_path)
- Download
The "Train" section of notebook includes train process of model.
We provide pre-trained ResCapsGuard.
To evaluate, use model weights new_capsules_changed_sinc_layer.pth
Due to the fact that a random part is cut out of the audio, the result may vary. The best result obtained: EER = 2.25 and t-DCF=0.0744
MIT License
Copyright (c) 2024 MTUCI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This repository is built on top of several open source projects.
The dataset we use is ASVspoof 2019 [1]
[1] ASVspoof 2019: A large-scale public database of synthesized, converted and replayed speech
@article{wang2020asvspoof,
title={ASVspoof 2019: A large-scale public database of synthesized, converted and replayed speech},
author={Wang, Xin and Yamagishi, Junichi and Todisco, Massimiliano and Delgado, H{\'e}ctor and Nautsch, Andreas and Evans, Nicholas and Sahidullah, Md and Vestman, Ville and Kinnunen, Tomi and Lee, Kong Aik and others},
journal={Computer Speech \& Language},
volume={64},
pages={101114},
year={2020},
publisher={Elsevier}
}