Skip to main content

maest-infer

PyPI Python 3.10+ License: AGPL-3.0

Inference-only package for MAEST (Music Audio Efficient Spectrogram Transformer).

This is a lightweight, dependency-minimal repackaging of MAEST focused solely on inference. For training, fine-tuning, and the full research codebase, please visit the original MAEST repository.


Installation

# From PyPI
pip install maest-infer

# Or with uv
uv pip install maest-infer

For development:

git clone https://github.com/openmirlab/maest-infer.git
cd maest-infer
pip install -e .

Usage

import torch
from maest_infer import get_maest

# Load model (downloads pretrained weights automatically)
model = get_maest(arch="discogs-maest-30s-pw-129e-519l")
model.eval()

# Inference with raw 16kHz audio
audio = torch.randn(16000 * 30)  # 30 seconds
logits, embeddings = model(audio)
# logits: (1, 519), embeddings: (1, 768)

# Predict with labels
activations, labels = model.predict_labels(audio)

Available Models

Model Input Length Labels Description
discogs-maest-5s-pw-129e 5 sec 400 PaSST weights
discogs-maest-10s-fs-129e 10 sec 400 From scratch
discogs-maest-10s-pw-129e 10 sec 400 PaSST weights
discogs-maest-10s-dw-75e 10 sec 400 DeiT weights
discogs-maest-20s-pw-129e 20 sec 400 PaSST weights
discogs-maest-30s-pw-129e 30 sec 400 PaSST weights
discogs-maest-30s-pw-73e-ts 30 sec 400 Teacher-student
discogs-maest-30s-pw-129e-519l 30 sec 519 Extended labels

All model checkpoints are hosted on GitHub Releases and downloaded automatically on first use (cached in ~/.cache/torch/hub/checkpoints/).


License

This package is licensed under AGPL-3.0-only, following the original MAEST license.


Credits & Acknowledgments

This package is a repackaging of MAEST (Music Audio Efficient Spectrogram Transformer) created by Pablo Alonso-Jimenez and colleagues at the Music Technology Group (MTG), Universitat Pompeu Fabra.

We are grateful to the original authors for making their research and pretrained models publicly available.


Citation

If you use MAEST in your research, please cite the original paper:

@inproceedings{alonso2023efficient,
    title={Efficient Supervised Training of Audio Transformers for Music Representation Learning},
    author={Alonso-Jim{\'e}nez, Pablo and Serra, Xavier and Bogdanov, Dmitry},
    booktitle={Proceedings of the 24th International Society for Music Information Retrieval Conference (ISMIR)},
    year={2023},
}

Related Projects

  • MAEST - Original research repository with training code
  • PaSST - Patchout faSt Spectrogram Transformer (base architecture)
  • Essentia - MAEST models in Essentia

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maest_infer-0.2.0.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maest_infer-0.2.0-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file maest_infer-0.2.0.tar.gz.

File metadata

  • Download URL: maest_infer-0.2.0.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for maest_infer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b500ec8c7bd9627f4e298b40e9cb3be4cb3975435cfc5f10a85f45504af9d53a
MD5 c226ec0fd442b359f6327d0e397ecb86
BLAKE2b-256 200ad28989ed1acdde8d746b4b202ee86e4ae1a7701d3274ed84bcaf6342b95e

See more details on using hashes here.

Provenance

The following attestation bundles were made for maest_infer-0.2.0.tar.gz:

Publisher: publish.yml on openmirlab/maest-infer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maest_infer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: maest_infer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 44.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for maest_infer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc0fb90418e88d144fa0fb258e9a0c76076ae6a21d73539efde25b4c5a1cf0a6
MD5 3e934cbfeeb9ff8b70c33d6c290d5d11
BLAKE2b-256 c25165f6cac1b62bdf097c28496d28d8c39579cf342dd17de0d950cd7a284bfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for maest_infer-0.2.0-py3-none-any.whl:

Publisher: publish.yml on openmirlab/maest-infer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page