Skip to main content

Automated lyrics video generator

Project description

PyPI - Version PyPI - License

Lyriks

Lyriks is an automated lyrics video generator. It transcribes the audio and automatically creates a video using MoviePy.


Features


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

  • --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 (use cuda for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lyriks_video-0.2.3.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lyriks_video-0.2.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file lyriks_video-0.2.3.tar.gz.

File metadata

  • Download URL: lyriks_video-0.2.3.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for lyriks_video-0.2.3.tar.gz
Algorithm Hash digest
SHA256 9d529fe46a8da9b4bc2bff4515b2e2f4bbda5ef1dbea76316d9dadf735ffe09b
MD5 c77f59fc2b8bb841762957cd7ce701d2
BLAKE2b-256 6a3ac16160d526388026b00c806e01c340b80106ee8d5e17c56b0645780e9c4c

See more details on using hashes here.

File details

Details for the file lyriks_video-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: lyriks_video-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for lyriks_video-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 09391b10e5a14af29334aa2f4fe67ea86026ae786a2c3fe6a545c6aec3ecee97
MD5 396f39742e0aabf21ddb56e1827117fe
BLAKE2b-256 3001b707ef3f834824069277d4de491812bb5c2ce1816023f778867e7a30238a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page