Skip to main content

A metric for acoustic music evaluation based on MAUVE and MERT

Project description

MAD

Implementation for MAUVE Audio Divergence (MAD) as described in Aligning Text-to-Music Evaluation with Human Preferences. Sound examples for the meta-evaluation data can be found on our demo page. The MusicPrefs dataset is available on Huggingface.

Installation

Install using pip:

pip install mad_metric

Or, install from source:

git clone https://github.com/i-need-sleep/mad.git
cd mad
pip install -e .

Usage

Programmic usage:

from mad_metric import compute_mad
score = compute_mad(
    eval_dir='DIR_OF_AUDIO_FILES_TO_BE_EVALUATED',
    ref_dir='DIR_OF_REFERENCE_AUDIO_FILES',
    [optional arguments...]
)

Command line usage:

mad_metric [-h] [--eval_dir EVAL_DIR] [--ref_dir REF_DIR] [--eval_embs_dir EVAL_EMBS_DIR] [--ref_embs_dir REF_EMBS_DIR] [--log_csv LOG_CSV] [--batch_size BATCH_SIZE] [--model_name MODEL_NAME] [--layer LAYER]
                  [--aggregation AGGREGATION]
  • eval_dir: The directory of audio files to be evaluated.
  • eval_embs_dir: If both eval_dir and eval_embs_dir are specified, the computed embeddings of the files will be stored under eval_embs_dir. If only eval_embs_dir is provided, the MAUVE score will be computed directly using the provided embeddings. At least one of eval_dir and eval_embs_dir must be provided.
  • ref_dir: Similar to eval_dir. We use FMA-Pop in our experiments.
  • ref_embs_dir: Similar to eval_embs_dir.
  • log_csv: The path to the csv file logging the MAD scores.
  • batch_size: The batch size used when computing embeddings.
  • model_name, layer, aggregation: Specifies which embeddings are used to compute the divergence. Defaults to the best setup with MERT according to our synthetic meta-evaluation with FMA-Pop as the reference set.

Project details


Download files

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

Source Distribution

mad_metric-0.0.6.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

mad_metric-0.0.6-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file mad_metric-0.0.6.tar.gz.

File metadata

  • Download URL: mad_metric-0.0.6.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for mad_metric-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a473103abb6b9f2013339ae0d4525463ba76804575bdd3eefb503b4d4d3d6a0d
MD5 a1c4e9e83382a646030f5010288a26c3
BLAKE2b-256 338fa4bc265bdf47c7bdfa5cdab6705c2ed07237092a4613e8603f204f61e736

See more details on using hashes here.

File details

Details for the file mad_metric-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: mad_metric-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for mad_metric-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 125987fc445fea63b32eecf30d7ba9246d34ef8c819fc5d6c91310d23565329e
MD5 bab73473b1765f7f55e7a7c1be6fda94
BLAKE2b-256 fc34a0305ee6cc18c52e984f27814954b9bcacf56f156e1a2587f61a57f20fa7

See more details on using hashes here.

Supported by

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