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
- An NVIDIA GPU (recommended for best performance; CPU is supported but slower)
- 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).
This should be a supported audio format (such as MP3 or WAV). -
LYRICS_FILE
Path to the lyrics file (plain text).
The lyrics should be in a text file, one line per lyric segment.
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 for transcription.
Options:tiny,base,small,medium,large,turbo -
--device,-d
Which device to use for Whisper model inference.
Options:cpu,cuda -
--generator,-g
Which backend to use for video generation.
Options:mp: MoviePy (slow, low quality)ps2: pysubs2 + ffmpeg (fast, good quality, experimental)ts: Only save transcript (for debugging)
-
--no-gemini
Disable Gemini improvements for Whisper output.
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
- Ask which background to use
- Batch processing
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.3.0.tar.gz.
File metadata
- Download URL: lyriks_video-0.3.0.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 |
2589ddabad888ef89296f535a8932dc73276c2316df15972f35bddd16eb18897
|
|
| MD5 |
e6ec548e933132ae1b1e78b5de9ac7c1
|
|
| BLAKE2b-256 |
77be8c3ddf49859da1a7295ced585afe4d0ebee40fcb9a27d939144a5d4163d9
|
File details
Details for the file lyriks_video-0.3.0-py3-none-any.whl.
File metadata
- Download URL: lyriks_video-0.3.0-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 |
c0333596512de137483ace0cfcf152443bd54667cb7d419416cc7e0945bbe39a
|
|
| MD5 |
564db8680802d4233b26619963eca104
|
|
| BLAKE2b-256 |
0bb27cb55e37f107031e9014338e2fa953d763f8516e2379074fe2e3228d5c25
|