crnn-lid icon indicating copy to clipboard operation
crnn-lid copied to clipboard

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

Open Suhairk opened this issue 5 years ago • 4 comments

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

Suhairk avatar Dec 23 '20 04:12 Suhairk

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.

Bartzi avatar Jan 04 '21 09:01 Bartzi

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.

JackWong0303 avatar Aug 04 '21 04:08 JackWong0303

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

mahbtn avatar Aug 28 '21 14:08 mahbtn

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.

nursumusod avatar Jun 04 '22 02:06 nursumusod