TASER2023 / TASER

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ALIF

The code of "ALIF: Low-Cost Adversarial Audio Attacks on Black-Box Speech Platforms Using Linguistic Features".

Here we provide the code for generating the attack examples described in the paper, and audio demos can be found on the Demo Page.

Descriptions of the code

  • alif_otl.py: The implementation of ALIF-OTL which is described in the paper.

  • alif_otl_run.py: Run alif_otl.py and generate the example.

  • alif_ota.py: The implementation of ALIF-OTA which is described in the paper.

  • alif_ota_run.py: Run alif_ota.py and generate the example.

  • optimizer.py: We implement the particle swarm optimization here and use it in the ALIF-OTA.

  • ASRs.py: The speech-to-text APIs need to be implemented here.

  • tacotron2: The repo of tacotron2 and we add some code at the bottom of model.py.

Environment

  • Python==3.6.13

  • torch==1.8.0+cu111

You are supposed to build the tacotron2 environment by yourself and more details can be found in Tacotron2.

How to generate the example

  1. You need to implement the functions in ASRs.py by yourself.

  2. Set the parameters in alif_otl_run.py or alif_ota_run.py.

  3. Just run alif_otl_run.py or alif_ota_run.py and the results will be saved in the directory alif_otl_example or alif_ota_example.

    python alif_otl_run.py or python alif_ota_run.py

About


Languages

Language:Jupyter Notebook 68.1%Language:Python 31.8%Language:Dockerfile 0.1%