Files
txtlyric-to-lrc/README.md
T

36 lines
1.6 KiB
Markdown
Raw Normal View History

2025-06-17 02:28:08 -07:00
# txtlyric-to-lrc
txtlyric-to-lrc aligns lyrics to songs in the [lrc](https://en.wikipedia.org/wiki/LRC_(file_format)) synced lyric format.
2026-05-31 10:52:46 -07:00
This is a simple wrapper around [stable-ts](https://github.com/jianfch/stable-ts) ([whisper](https://github.com/openai/whisper)) that is designed to be used with known-good transcriptions like untimed song lyrics.
2025-06-17 02:28:08 -07:00
2026-05-31 10:52:46 -07:00
Untimed lyrics are expected to be placed alongside media files in `txt` files, and lines of lyrics (segments) should be separated by newlines. Output files will be written out alongside the original `txt` and media files using the same name.
Given a pre-existing lrc file with line-level timings, specifying the `yaml` format will generate word-level timings that fit inside each line's timing bounds.
Note: It is suggested to first convert plain lyrics to lrc files, adjust the line-level timings, and then add word-level timings by outputting to yaml files.
2025-06-17 02:28:08 -07:00
## How to Use
```sh
$ python ./txtlyric_to_lrc/main.py -h
Usage: main.py [OPTIONS] DIRECTORY
Options:
2026-05-31 10:52:46 -07:00
-h, --help Show this message and exit.
-m, --model TEXT Which whisper model to use (choices are those of
whisper.available_models)
-l, --language TEXT What language the lyrics are in [required]
-f, --format [yaml|lrc] Output format. 'yaml' writes a Lyricsfile (.yaml)
with word-level timings; 'lrc' writes classic LRC
(.lrc). [default: yaml]
2025-06-17 02:28:08 -07:00
```
## How to Develop
```sh
git clone https://g.dracoli.ch/rufei/txtlyric-to-lrc.git
cd txtlyric-to-lrc
poetry install
```
## TODO
2026-05-31 10:52:46 -07:00
* connect with lyric retrieval services