carlini / audio_adversarial_examples

Targeted Adversarial Examples on Speech-to-Text systems
BSD 2-Clause "Simplified" License
289 stars 90 forks source link

I found and fixed some Wrong in README when I follow it on a clear Unbuntu OS #30

Open libingwei opened 5 years ago

libingwei commented 5 years ago

I found three point as follows :

  1. The pandas version should be 0.24.0 int step 1.

  2. The command "pip3 install $(python3 util/taskcluster.py --decoder)" should be placed after "git clone https://github.com/mozilla/DeepSpeech.git" .

  3. The "attack.py " should be replaced by " classify.py " in step 5 and step 8.

I modified it as follows:

(Notice the bold parts)


Instructions for basic use:

  1. Install the dependencies pip3 install tensorflow-gpu==1.14 progressbar numpy scipy pandas==0.24.0 python_speech_features tables attrdict pyxdg
  1. Clone the Mozilla DeepSpeech repository into a folder called DeepSpeech: git clone https://github.com/mozilla/DeepSpeech.git
  1. Download the DeepSpeech model wget https://github.com/mozilla/DeepSpeech/releases/download/v0.4.1/deepspeech-0.4.1-checkpoint.tar.gz tar -xzf deepspeech-0.4.1-checkpoint.tar.gz

  2. Verify that you have a file deepspeech-0.4.1-checkpoint/model.v0.4.1.data-00000-of-00001, Its MD5 sum should be ca825ad95066b10f5e080db8cb24b165 md5sum deepspeech-0.4.1-checkpoint/model.v0.4.1.data-00000-of-00001

  3. Check that you can classify normal audio files correctly python3 classify.py --in sample-000000.wav --restore_path deepspeech-0.4.1-checkpoint/model.v0.4.1

  4. Generate adversarial examples python3 attack.py --in sample-000000.wav --target "this is a test" --out adv.wav --iterations 1000 --restore_path deepspeech-0.4.1-checkpoint/model.v0.4.1

  5. Verify the attack succeeded python3 classify.py --in adv.wav --restore_path deepspeech-0.4.1-checkpoint/model.v0.4.1


tom-doerr commented 5 years ago

Additionally, "images" in step 5 could be changed to "audio files".

carlini commented 5 years ago

Ah yes, thanks for catching this. I will make these changes.