"SpectrogramGenerator Exception: [Errno 2] No such file or directory: 'tmp_images/tmp_91484.png' audio_segment/malayalam"
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
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.
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.
did you find a solution for this am also having the same error
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 beforeos.remove(). It can be solved by saving the created images to a temporary folder by commenting outos.remove(file_name)and changingfile_nametofile_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.