Skip to main content

No project description provided

Project description

lrcdl

lrcdl is a command-line tool for fetching lyrics from audio files using https://lrclib.net.

Installation

pip install lrcdl

Basic Usage

Download lyrics (.lrc) from a track:

lrcdl song.mp3

By default, lrcdl will only download timed lyrics if they're found. To include plain, non-timed lyrics, use the --include-plain flag:

lrcdl song.mp3 --include-plain

Which will download plain lyrics only if timed ones were not found.

Supplying metadata

lrcdl relies on the metadata inside the audio track to find lyrics. In cases where the audio file does not have enough metadata, you can manually fill them in using the following parameters: --title, --album, --artist

Example:

lrcdl "Ghost Division.flac" --title "Ghost Division" --album "The Art of War" --artist Sabaton

Downloading lyrics for entire music library

If you have a music library and you want to download lyrics for all tracks, you can use the -r/--recursive option while specifying a directory as the path:

lrcdl /PATH/TO/MUSIC -r

Note that lrcdl will skip files that already have an LRC file and will not overwrite them.

This command can be safely setup as a scheduled task or a cron job to download lyrics on a nightly basis, however if you have a lot of tracks in your library which lrcdl cannot find lyrics for, then lrcdl will continue to try and download lyrics for them on every run.

To improve performance and avoid unnecessary strain on lrclib's servers, you're highly advised to specify a cache file to skip already-checked files on the next run:

lrcdl /PATH/TO/MUSIC/ -r --cache /PATH/TO/CACHE/cache.txt

Python API

To use within Python:

from lrcdl import Track, Options

options = Options()
track = Track("/path/to/song.mp3", options)

track.download_lyrics()
# or specify a path
track.download_lyrics("/path/to/song.lrc")

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

lrcdl-0.2.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

lrcdl-0.2.4-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file lrcdl-0.2.4.tar.gz.

File metadata

  • Download URL: lrcdl-0.2.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.1.0-23-amd64

File hashes

Hashes for lrcdl-0.2.4.tar.gz
Algorithm Hash digest
SHA256 019e6b7c0b512eb3b1873755c7e1c195abc572aace0b3404e3f059f2c3b07ba8
MD5 5c276ab46c10a0acb8b03d9dbd665877
BLAKE2b-256 244dc445fb2e7941dd916b2dd70c33538a798cda3661ec9c41fbe7e2dd89f84a

See more details on using hashes here.

File details

Details for the file lrcdl-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: lrcdl-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.1.0-23-amd64

File hashes

Hashes for lrcdl-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 78f3f72c82160c546a306e26d0c5239886cd04acc0748f8bf11285ccba05f2c0
MD5 59d5a05aad94b915cd464dea1c261ac8
BLAKE2b-256 47e6a53890ff5f8f16664e3f5491559ac1b57f7ed1b287beb9aaf65d427f91d9

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