Skip to content

Error in embed_audio.ipynb #719

@jongalon

Description

@jongalon

I was trying to use the embed_audio.ipynb notebook to learn how to implement perch for extracting embeddings. However. I've got an error in the forth cell.


TypeError Traceback (most recent call last)
Cell In[11], line 13
10 config.source_file_patterns = ['gs://chirp-public-bucket/soundscapes/powdermill/Recording*/*.wav'] #@param
11 config.output_dir = embeddings_path.as_posix()
---> 13 model_key, embedding_dim, model_config = model_configs.get_preset_model_config(model_choice)
14 config.embed_fn_config.model_key = model_key
15 config.embed_fn_config.model_config = model_config

TypeError: cannot unpack non-iterable PresetInfo object


So, I had to change the following code:

model_key, embedding_dim, model_config = model_configs.get_preset_model_config(model_choice)
config.embed_fn_config.model_key = model_key
config.embed_fn_config.model_config = model_config

for this one:

preset_info = model_configs.get_preset_model_config(model_choice)
config.embed_fn_config.model_key = preset_info.model_key
config.embed_fn_config.model_config = preset_info.model_config

and it worked.

So, I wanted to know if there is something wrong with the code or if I got a bad installation of the repository. I am trying to use it in a studio in lightnin.ai.

Thanks!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions