Generate line-level .lrc and .srt lyric files from audio and reference lyrics
Project description
AutoLRC
Generates line-level .lrc and .srt files from an audio file and a reference lyrics .txt. Source audio is never modified.
Setup
Requires Python 3.12 and ffmpeg on PATH.
python3.12 -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
# GPU (CUDA 12.8)
pip install torch --index-url https://download.pytorch.org/whl/cu128
pip install -e .[gpu,dev]
# CPU
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install -e .[cpu,dev]
Verify the install:
autolrc doctor
Single File
autolrc align --audio song.wav --lyrics song.txt
Outputs song.lrc and song.srt alongside the audio file.
Key options:
| Option | Effect |
|---|---|
--title, --artist |
Write [ti], [ar] tags to the LRC |
--lang <code> |
Override language (default: auto-detected) |
--separator-boost |
Separate vocals before aligning (improves noisy tracks) |
--save-vocals |
Keep the separated stem as song.vocals.wav |
--json-report |
Write a song.json quality report |
--model |
Whisper model size: base, small, medium (default), large-v3 |
--device |
auto (default), cuda, or cpu |
The [la] tag is written automatically from the detected language; --lang overrides it.
If alignment finishes with average_confidence < 0.5, inspect the output and consider rerunning with --separator-boost.
Examples:
# With metadata tags
autolrc align --audio song.wav --lyrics song.txt --title "Song Name" --artist "Artist"
# With vocal separation and quality report
autolrc align --audio song.wav --lyrics song.txt --separator-boost --save-vocals --json-report
Batch Mode
Pass a directory to --audio to process all matching pairs at once:
autolrc align --audio ./my-songs/
autolrc align --audio ./my-songs/ --artist "Artist" --json-report
Rules:
- Scans the given directory only (not recursive)
- Matches same-stem
.wav/.mp3with a sibling.txt; prefers.wavwhen both exist - Continues on per-track failures; exits with code
1if any track fails --titleand--langare rejected;--artistis allowed- When
--artistis given, each LRC gets[ar:<artist>]and[ti:<file-stem>]
Per-track outputs: song.lrc, song.srt, and optionally song.json, song.vocals.wav
Other Commands
autolrc inspect --lyrics song.txt # Preview normalized lyric lines
autolrc doctor # Show runtime diagnostics
autolrc cache clear # Remove the local cache directory
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autolrc_tools-0.2.1.tar.gz.
File metadata
- Download URL: autolrc_tools-0.2.1.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d2b93a2613b477610eece36cd7a1c7b8bb1293a5eb498a8b4536ccf592e1b11
|
|
| MD5 |
f69a00c594c299bc034ca65128c5f5c6
|
|
| BLAKE2b-256 |
43f296f97a90e5bc2f5ee360522396a41aa704d764158ef402a2e1ce5601b6c9
|
File details
Details for the file autolrc_tools-0.2.1-py3-none-any.whl.
File metadata
- Download URL: autolrc_tools-0.2.1-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86b3a89874519074df905652348dda35cff64ca748e1a11d3994ca6bba45afb4
|
|
| MD5 |
75969fd6ac4e7b9b46774958bebe6850
|
|
| BLAKE2b-256 |
2d828488db3eaa8c646c2dc2686495bd4fc9930b63cfb5729aecd1ef36d3f7c1
|