HPI-DeepLearning / crnn-lid

Code for the paper Language Identification Using Deep Convolutional Recurrent Neural Networks
GNU General Public License v3.0
105 stars 48 forks source link

"SpectrogramGenerator Exception: [Errno 2] No such file or directory: 'tmp_images/tmp_91484.png' audio_segment/malayalam" #34

Open Suhairk opened 3 years ago

Suhairk commented 3 years ago

Im new to AI and when i have try to run python wav_to_spectrogram.py --source audio_segment --target target_spectrogram it showing up an error "SpectrogramGenerator Exception: [Errno 2] No such file or directory: 'tmp_images/tmp_91484.png' audio_segment/malayalam" i have expecting your reply, Thanks in advance

Bartzi commented 3 years ago

Well, it seems the script is not able to find your input data. Or the output directory does not exist. I could tell you more, if you could paste the full traceback.

JackWong0303 commented 3 years ago

It can be solved by removing the single quotation marks in the sox command in SpectrogramGenerator.py. But then it will create a ValueError : I/O operation on closed file, since the image is not closed before os.remove(). It can be solved by saving the created images to a temporary folder by commenting out os.remove(file_name) and changing file_name to file_name = "path\\to\\temp_folder\\tmp_{}.png".format(random.randint(0, 100000)) and then delete the temporary folder after getting all Spectrogram images.

mahbtn commented 3 years ago

did you find a solution for this am also having the same error

nursumusod commented 2 years ago

It can be solved by removing the single quotation marks in the sox command in SpectrogramGenerator.py. But then it will create a ValueError : I/O operation on closed file, since the image is not closed before os.remove(). It can be solved by saving the created images to a temporary folder by commenting out os.remove(file_name) and changing file_name to file_name = "path\\to\\temp_folder\\tmp_{}.png".format(random.randint(0, 100000)) and then delete the temporary folder after getting all Spectrogram images.

i did what you said but i still receive the same error.