Skip to main content

Automatic lyrics transcription evaluation toolkit

Project description

alt-eval

An automatic lyrics transcription (ALT) evaluation toolkit, released with the Jam-ALT benchmark.

The package implements metrics designed to work well with lyrics formatted according to music industry standards (see the Jam-ALT annotation guide), namely:

  • A word error rate (WER) computed on text tokenized in a way that accounts for non-standard spellings common in song lyrics.
  • A case error rate, measuring the rate of incorrectly predicted letter case.
  • Precision, recall and F-score for symbols important for written lyrics:
    • Punctuation
    • Parentheses (used to delimit background vocals)
    • Line breaks
    • Section breaks (i.e. double line breaks)

Usage

Install the package with pip install alt-eval.

To compute the metrics:

from alt_eval import compute_metrics
compute_metrics(references, hypotheses)

where references and hypotheses are lists of strings. To specify the language (English by default), use the languages parameter, passing either a single language code, or a list of language codes corresponding to individual examples.

For JamALT, use:

from datasets import load_dataset
dataset = load_dataset("audioshake/jam-alt")["test"]
compute_metrics(dataset["text"], transcriptions, languages=dataset["language"])

Use visualize_errors=True to also get a list of HTML snippets that can be used to visualize the errors in each transcript.

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

alt-eval-1.0.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

alt_eval-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file alt-eval-1.0.0.tar.gz.

File metadata

  • Download URL: alt-eval-1.0.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for alt-eval-1.0.0.tar.gz
Algorithm Hash digest
SHA256 257a4cbf808560c498a352969d62398f60d77db5356cae5ae8839d794401d0f1
MD5 9729d0e078033529e7fcf065c9c17932
BLAKE2b-256 5ee101133df0cf7dfa8369d2829503b05c1f392f6c4a41d7796030f34254a418

See more details on using hashes here.

File details

Details for the file alt_eval-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: alt_eval-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for alt_eval-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b65d25a54c712d2cded8c706d33443a9f6ed32d629c5f79fd826966dcd78e430
MD5 2231f8316dbbc5179cb74ceed8146a23
BLAKE2b-256 ed81dddcd683175478d49d4c77179e7e7443350884effe2c26d8052cc8b5b608

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