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.0rc1.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.0rc1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: alt-eval-1.0.0rc1.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.0rc1.tar.gz
Algorithm Hash digest
SHA256 f4768be8fd176d790d32a7b8445290585152dda9682d4b6bd0257604ab6b7772
MD5 af53fa59680314a1a507b858bbb8cb6d
BLAKE2b-256 2b86a1096bbdfd8aea3000cab8967d644a82794e35f605d321518e2da7399e9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: alt_eval-1.0.0rc1-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.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 bad2e0f8d7fdaa24f7766d8182f59f1f06bf95d16ff61bc30ea97e8c1b2e7c27
MD5 88f67efc42ef9c0cf6bf670f53317433
BLAKE2b-256 f23a98138ab0835bedd649acbc6444906d5d6885869ca51680a77ade27a52dd6

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