Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Suhairk opened this issue Dec 23, 2020 · 4 comments

Comments

@Suhairk
Copy link

Suhairk commented Dec 23, 2020

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
Copy link
Member

Bartzi commented Jan 4, 2021

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
Copy link

JackWong0303 commented Aug 4, 2021

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
Copy link

mahbtn commented Aug 28, 2021

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

@nursumusod
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants