marl/openl3

Unable to find models

happypanda5 opened this issue · 3 comments

Hello, thank you for this wonderful tool

I am unable to find the "h5" models when I call openl3.get_audio_embedding function.

The error is:

OSError: Unable to open file (unable to open file: name = '/content/openl3/openl3/openl3_audio_linear_env.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

I checked the openl3 folder and there are indeed no model files there. Can you please confirm if the model links are active? Perhaps the models are not being downloaded due to a broken link.

Thank you

@hohsiangwu @jtcramer @justinsalamon @lostanlen

Can you please provide links to the model files in h5 format? I can manually pasted them in the intended folder.

It could be an issue with the base link https://github.com/marl/openl3/raw/models/ from where the models are supposed to be picked up. For example, https://github.com/marl/openl3/raw/models/openl3_audio_linear_env.h5 returns a page not found.

Thank you.

I just installed openl3 intro a fresh conda environment (python 3.6) via pip install openl3 and I was able to call emb, ts = openl3.get_audio_embedding(audio, sr) without any errors.

How did you install the repo? If you installed it from source (rather than via pip), note that the model files are stored on GH in a compressed format (.gz) and need to be uncompressed before they can be used (the pip installation takes care of this). Without further information, I'd guess your problem is related to this issue.

Installing via pip should fix your problem. If you need to install from source, make sure to uncompress the model files manually. The error you pasted is about not finding the model file on your file system, not about not being able to download it from GH. I'm guessing you have the files locally as .gz while the code is looking for the uncompressed .h5 file.

If you try the two suggestions above and are still experiencing issues please describe your system (OS, python environment etc.) and the exact process you followed to install openl3.

If the above suggestions fix your issue, please let us know so we can close this issue out. Thanks.

Thank you, pip install openl3 did the trick.

Previously, I was cloning the repo and install it from there.