https://github.com/netgian/lyric2srt
converts synchronized lyrics (in timestamp format) to SRT files
https://github.com/netgian/lyric2srt
Last synced: 2 months ago
JSON representation
converts synchronized lyrics (in timestamp format) to SRT files
- Host: GitHub
- URL: https://github.com/netgian/lyric2srt
- Owner: netgian
- License: mit
- Created: 2025-01-03T19:37:57.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-10T16:36:19.000Z (3 months ago)
- Last Synced: 2025-02-10T17:36:33.009Z (3 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lyric2srt
`lyric2srt` is a Python script that converts synchronized lyrics (in timestamp format) to SRT files, the standard format used for subtitles.
This project was made possible thanks to the [lrclib.net](https://lrclib.net) API.## Requirements
- Python 3.7 or higher.
- Required libraries:
- `requests`Install requests by running:
```bash
pip install requests
```## Usage
The script can be run from the command line with the following arguments:
```bash
python lyric2srt.py [--album ] [--duration ]
```### Example:
```bash
python lyric2srt.py "Shape of You" "Ed Sheeran" --album "Divide" --duration 233
```This command will fetch the synchronized lyrics of the song and save them in a `lyrics.srt` file.
## Output
The output file (`lyrics.srt`) contains the synchronized lyrics in SRT format, ready to be used as subtitles in compatible media players.
### Example SRT output:
```
1
00:00:00,000 --> 00:00:10,500
The club isn't the best place to find a lover2
00:00:10,500 --> 00:00:15,200
So the bar is where I go
```## Contribution
If you'd like to contribute, please open an issue or submit a pull request.
## License
This project is licensed under the MIT License. See the `LICENSE` file for details.