carlini / audio_adversarial_examples

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

AttributeError: module 'DeepSpeech' has no attribute 'create_flags' #37

Open Jackjiang313 opened 4 years ago

Jackjiang313 commented 4 years ago

Hello,

When I run " python3 classify.py --in sample-000000.wav --restore_path ../deepspeech-0.4.1-checkpoint/model.v0.4.1", I got this error.

tom-doerr commented 4 years ago

I don't know what causes the issue, but it seems to be related to your DeepSpeech setup. DeepSpeech gets set up automatically if you use the code on my fork: https://github.com/tom-doerr/audio_adversarial_examples

Jackjiang313 commented 4 years ago

Thanks TOM, I have run it successfully using your docker image.

manjitullal commented 2 years ago

commenting here, in case this helps others. I think the reason you get the error 'DeepSpeech' has no attribute 'create_flags' is because you might be running this code in tensorflow 2 environment in which the deepspeech package does not get imported correctly since version 0.41 is meant to be used in tensorflow 1. the fix is to use tensorflow 1 or use below 2 lines to have same effect.

import tensorflow.compat.v1 as tf tf.disable_v2_behavior()