This repository contains code for the paper titled "Is Audio Spoof Detection Robust to Laundering Attacks?". Seven state-of-the-art (SOTA) Audio Spoof Detection systems are evaluated against laundering attacks. These systems are,
- CQCC-GMM (https://github.com/asvspoof-challenge/2021/tree/main/LA/Baseline-CQCC-GMM/python)
- LFCC-GMM (https://github.com/asvspoof-challenge/2021/tree/main/LA/Baseline-LFCC-GMM/python)
- LFCC-LCNN (https://github.com/asvspoof-challenge/2021/tree/main/LA/Baseline-LFCC-LCNN)
- OC-Softmax (https://github.com/hashim19/AIR-ASVspoof)
- RawNet2 (https://github.com/eurecom-asp/rawnet2-antispoofing)
- RawGAT-ST (https://github.com/eurecom-asp/RawGAT-ST-antispoofing)
- AASIST (https://github.com/clovaai/aasist)
The repository is structured as follows:
Folder | Description |
---|---|
Audio Spoof Detection Systems | |
/ASD_ML/ |
Contains code for CQCC-GMM and LFCC-GMM systems |
/LFCC-LCNN/ |
Contains code for LFCC-LCNN system |
/AIR-ASVspoof/ |
Contains code for OC-Softmax system |
/RawNet2/ |
Contains code for RawNet2 system |
/RawGAT-ST-antispoofing/ |
Contains code for RawGAT system |
/aasist/ |
Contains code for AASIST system |
Evaluation | |
/Score_Files/ |
Contains protocol files and evaluated score files |
This repository uses two databases
- ASVSpoof 2019 (This database can be downloaded from the [ASVSpoof website] (https://www.asvspoof.org/))
- ASVSpoof Laundered Database (This database can be downloaded from the [ISSFLab website] (https://issf.umd.umich.edu/downloads/data))
The folder Score_Files contains score files generated by running SOTA audio spoof detection systems on the ASVSpoof 2019 eval dataset and ASVSpoof Laundered Database.
The command to reproduce the EER looks like this,
python3 evaluate_tDCF_asvspoof19.py --protocol_filename= 'protocol filename' --score_filename='score filename
For example, if you want to reproduce the results for LFCC-GMM in the presence of babble noise with SNR = 10db, run the following command,
python3 evaluate_tDCF_asvspoof19.py --protocol_filename=babble_10_10_5_protocol.txt --score_filename=scores-lfcc-gmm-512-babble-10-10-5-asvspoof19-LA-labels.txt --score_file_has_keys
Linux with GPU support, Conda, and Python Python dependency:
- Python 3 (test on python3.9)
- virtualenv
# Go inside the ASD_ML directory
cd ASD_ML
# create a virtual environment and activate the virtual environment
python3 -m venv venv
source venv/bin/activate
# install the required libraries
pip3 install -r requirements.txt
The parameters can be configured through the config file. After setting the configuration parameters, activate the virtual environment using the following commands,
source venv/bin/activate
First features are extracted and then the trained Gaussian mixture model is used to generate the score files,
python3 extract_features.py
python3 test.py
You may use Conda and ./env.yml to build the Python dependency environment:
Go inside the LFCC-LCNN directory
cd LFCC-LCNN
# create environment
$: conda env create -f env.yml
# load environment (whose name is pytorch-asvspoof2021)
$: conda activate pytorch-asvspoof2021
First, set the database path, laundering type, laundering parameter, and trained model path inside the 01_wrapper_eval.sh script.
To generate a score file, run
cd project
bash 01_wrapper_eval.sh
The score file will be generated in the Score_Files directory.
# Go inside the AIR-ASVspoof directory
cd AIR-ASVspoof
# create a virtual environment and activate the virtual environment
python3 -m venv venv
source venv/bin/activate
# install the required libraries
pip3 install -r requirements.txt
First, set the database path, laundering type, and laundering parameter inside the config file. Then run the following commands,
# first extract features
python3 process_LA_data.py
# Then generate the EER and score file
python3 test.py
The score file will be generated in the Score_Files directory.
create and activate a conda environment, and install the requirements :
conda create --name rawnet_anti_spoofing python=3.6.10
conda activate rawnet_anti_spoofing
conda install pytorch=1.4.0 -c pytorch
pip install -r requirements.txt
First, set the database path, laundering type, and laundering parameter inside the config file. Then run the following command,
python3 main.py --eval
create and activate a conda environment, and install the requirements :
conda create --name RawGAT_ST_anti_spoofing python=3.8.8
conda activate RawGAT_ST_anti_spoofing
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
pip install -r requirements.txt
First, set the database path, laundering type, and laundering parameter inside the config file. Then run the following command,
python3 main.py
# Go inside the aasist directory
cd aasist
# create a virtual environment and activate the virtual environment
python3 -m venv venv
source venv/bin/activate
# install the required libraries
pip3 install -r requirements.txt
First, set the database path, laundering type, laundering parameter, and score directory inside the config/AASIST.conf file. Then run the following command,
python3 main.py --eval --config ./config/AASIST.conf