marl / marl/openl3

Make an object-oriented interface for embedding models

Open
#22 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Jupyter Notebook
Stars
604
Forks
66
PR merge metrics
No merged PRs in 30d

Description

An object interface for extracting embeddings would make it simpler to extract multiple embeddings and would allow for the embedding model to just be loaded once instead of every time the `get_embedding` function is called.

At least to begin with, the interface could just be something like

```
m = EmbeddingModel(input_repr="mel256", content_type="music",
embedding_size=6144, center=True, hop_size=0.1):
emb, ts = m.get_embedding(audio, sr, verbose=1)
m.process_file(filepath, output_dir=None, suffix=None)
```

Basically, we'd just put all of the functions from https://github.com/marl/openl3/blob/master/openl3/core.py into a class.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing openl3/core.py and the existing get_embedding and process_file entry points. Map those functions to the proposed EmbeddingModel interface, ensuring the embedding model can be loaded once and reused for multiple embeddings; done means the shown audio and file-processing calls work through the class.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.