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
track = Track("/path/to/song.mp3")
options = Options()
# or specify a path
options = Options(download_path="/path/file.lrc")
track.download_lyrics(options)
Metadata
Release files for lrcdl 0.2.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lrcdl-0.2.10.tar.gz | 5.2 kB | Without provenance | Details for lrcdl-0.2.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lrcdl-0.2.10-py3-none-any.whl | Python 3 | none | any | Details for lrcdl-0.2.10-py3-none-any.whl |
Total release size: 12.4 kB
Release files / lrcdl-0.2.10.tar.gz
| Download URL | lrcdl-0.2.10.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8537832d6d7ce5d90a5c5ede1aad1460f54c2851d2c2e8aca25cb2c6fca4009
|
|
BLAKE2b-256 checksum How to use checksums |
3d5fdfdc262416db262606492331fe260bb9da0015789e845f0f865b1334f496
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.2 Linux/6.1.0-32-amd64
|
Release files / lrcdl-0.2.10-py3-none-any.whl
| Download URL | lrcdl-0.2.10-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24c7640fc8f664879b27396eb7920b45a5fe974a994da582a4f8593d0da118d0
|
|
BLAKE2b-256 checksum How to use checksums |
0883ea92bf86b1efaf05adaeceffe7e4930f0aa5eb003f82f020ba11b19587fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.2 Linux/6.1.0-32-amd64
|
Security for lrcdl 0.2.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.