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
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
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
Verify the attack succeeded
python3 classify.py --in adv.wav --restore_path deepspeech-0.4.1-checkpoint/model.v0.4.1
I found three point as follows :
The pandas version should be 0.24.0 int step 1.
The command "pip3 install $(python3 util/taskcluster.py --decoder)" should be placed after "git clone https://github.com/mozilla/DeepSpeech.git" .
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:
2a. Install decoder cd DeepSpeech pip3 install $(python3 util/taskcluster.py --decoder)
2b. Checkout the correct version of the code: git checkout tags/v0.4.1
2c. If you get an error with tflite_convert, comment out DeepSpeech.py Line 21 # from tensorflow.contrib.lite.python import tflite_convert
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
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
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
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
Verify the attack succeeded python3 classify.py --in adv.wav --restore_path deepspeech-0.4.1-checkpoint/model.v0.4.1