Automated lyrics video generator
Project description
Lyriks
Lyriks is an automated lyrics video generator. It transcribes the audio and automatically creates a video using MoviePy.
Features
- Automatic vocal separation using Demucs
- Transcription with OpenAI Whisper and whisper-timestamped
- Synchronized lyrics video generation with MoviePy
Requirements
- Linux
- A NVIDIA GPU
- 10GB of free disk space
- Python 3.11
Installation
It is highly recommended to use a virtual environment for isolation:
python3 -m venv .venv
source .venv/bin/activate
Then install Lyriks with pip:
pip install lyriks-video
Usage
python -m lyriks generate AUDIO_FILE LYRICS_FILE [OPTIONS]
Parameters
- AUDIO_FILE: Path to the input audio file (e.g.,
song.mp3). - LYRICS_FILE: Path to the lyrics file (plain text).
Options
You will be interactively prompted in the CLI for any options you leave unspecified.
-
--output,-o
Output video file name (without extension).
Example:-o my_lyrics_video -
--model_size,-m
Sets the Whisper model size.
Options:tiny,base,small,medium,large
Default:small -
--device,-d
Which device to use for Whisper model inference.
Options:cpu,cuda
Default:cpu(usecudafor GPU acceleration)
Example
python -m lyriks generate path/to/song.mp3 path/to/lyrics.txt -m small -d cuda -o output_video
Note: This process can take up to 20 minutes on lower end hardware.
TODO
- Fix up lyrics using Gemini
- Per-word highlighting in videos
- Fancier video styles and effects
- Add more robust error handling
Credits
This project uses Demucs for music vocal separation.
@inproceedings{rouard2022hybrid,
title={Hybrid Transformers for Music Source Separation},
author={Rouard, Simon and Massa, Francisco and D{'e}fossez, Alexandre},
booktitle={ICASSP 23},
year={2023}
}
@inproceedings{defossez2021hybrid,
title={Hybrid Spectrogram and Waveform Source Separation},
author={D{'e}fossez, Alexandre},
booktitle={Proceedings of the ISMIR 2021 Workshop on Music Source Separation},
year={2021}
}
Project details
Release history Release notifications | RSS feed
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 lyriks_video-0.2.7.tar.gz.
File metadata
- Download URL: lyriks_video-0.2.7.tar.gz
- Upload date:
- Size: 45.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c47c12590d2e6da5405414f2db403b0806ea76e2d1320291fb4dba2260e8429
|
|
| MD5 |
10d6c3533dd768df4fec2d1817865956
|
|
| BLAKE2b-256 |
b33beb2eed6a155310a5f06932caabbc1631ce9752d55d520fd540ba98a05c81
|
File details
Details for the file lyriks_video-0.2.7-py3-none-any.whl.
File metadata
- Download URL: lyriks_video-0.2.7-py3-none-any.whl
- Upload date:
- Size: 45.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
998137bd0145f232ba270f3bad56f2dfeee3c94df9d7816f63c6cc477c5013ed
|
|
| MD5 |
44362cfaca01b85d4ff0bbc0217b3af4
|
|
| BLAKE2b-256 |
8210a45653a7c2e9ca671bc55b4532afc7a6b38b6f8a4d46c82287cc8e548ade
|