diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..18e8c3f --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# txtlyric-to-lrc + +txtlyric-to-lrc aligns lyrics to songs in the [lrc](https://en.wikipedia.org/wiki/LRC_(file_format)) synced lyric format. + +This is a 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. + +Lyrics are expected to be placed alongside media files in `txt` files, and lines of lyrics should be separated by newlines. Output files will be placed alongside media in `lrc` files. + +## How to Use +```sh +$ python ./txtlyric_to_lrc/main.py -h +Usage: main.py [OPTIONS] DIRECTORY + +Options: + -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 [required] +``` + +## How to Develop +```sh +git clone https://g.dracoli.ch/rufei/txtlyric-to-lrc.git +cd txtlyric-to-lrc +poetry install +``` + +## TODO +* detect musical interludes (might already be possible in stable-ts) +* support elrc word timings (need to check navidrome and subsonic clients won't throw a fit) \ No newline at end of file diff --git a/txtlyric_to_lrc/main.py b/txtlyric_to_lrc/main.py index d30c085..fc9aaca 100644 --- a/txtlyric_to_lrc/main.py +++ b/txtlyric_to_lrc/main.py @@ -17,6 +17,7 @@ song_file_extensions = set([ ]) @click.command() +@click.help_option("--help", "-h") @click.option('--model', '-m', default='small', help='Which whisper model to use (choices are those of whisper.available_models)') @click.option('--language', '-l', required=True) @click.argument('directory')