Skip to content

Latest commit

 

History

History
201 lines (145 loc) · 5.79 KB

README.md

File metadata and controls

201 lines (145 loc) · 5.79 KB

Rob-ASD

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,

Folder Structure

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

Database

This repository uses two databases

Reproducing EERs Using Score Files

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

Requirement

Linux with GPU support, Conda, and Python Python dependency:

  1. Python 3 (test on python3.9)
  2. virtualenv

ASD_ML

Installation

# 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

Evaluation

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

LFCC-LCNN

Installation

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

Evaluation

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.

OC-Softmax

Installation

# 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

Evaluation

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.

RawNet2

Installation

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

Evaluation

First, set the database path, laundering type, and laundering parameter inside the config file. Then run the following command,

python3 main.py --eval

RawGAT-ST

Installation

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

Evaluation

First, set the database path, laundering type, and laundering parameter inside the config file. Then run the following command,

python3 main.py

AASIST

Installation

# 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

Evaluation

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