A simple Python script to automatically download synced lyrics (.lrc files) for your local music library. It scans directories for audio files, fetches lyrics from Lrclib, and saves them alongside the audio files.
Warning
Audio files need to include metadata for artist, title, album, and duration in order to be extracted. Lyrics will only be downloaded if this metadata is present. Only synced lyrics are downloaded.
- Recursive Scanning: Scans provided directories recursively for supported audio files.
- Metadata Extraction: Uses
tinytagto read artist, title, album, and duration from audio files. - Synced Lyrics: Fetches time-synced lyrics from Lrclib.
- LRC File Generation: Creates
.lrcfiles with standard metadata headers. - Rich Logging: Uses
richfor beautiful console logging.
- Python 3.13 or higher
- Dependencies:
requestsrichtinytag
-
Clone the repository:
git clone https://github.com/neogib/lyrics-downloader.git cd lyrics-downloader -
Install dependencies (using
uvorpip):# If using uv (recommended) uv sync # Or using pip pip install -r requirements.txt
Run the script by providing one or more file or directory paths:
python main.py /path/to/music/folder /path/to/another/song.mp3The script will:
- Find all supported audio files in the given paths.
- Extract metadata for each file.
- Query the Lrclib API.
- Save a
.lrcfile in the same directory as the audio file if lyrics are found.
The script supports all file formats supported by tinytag, including:
- MP3
- M4A
- FLAC
- OGG
- OPUS
- WAV
- and more...
Logs are output to the console and saved to download_lyrics.log.