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.4.tar.gz (45.0 MB 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.4-py3-none-any.whl (45.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lyriks_video-0.2.4.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

Hashes for lyriks_video-0.2.4.tar.gz
Algorithm Hash digest
SHA256 fc3b15ae5f9843ede53347c1b7e4aa9d0be39eee34bf8b25a421462984c4fff9
MD5 6d558173c832d739ad63596177c14ea3
BLAKE2b-256 fe0c9827e5483d07d38cc2b490a97b4855b23476ee6d0919b2b241415838eab6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lyriks_video-0.2.4-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

Hashes for lyriks_video-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c33f7769a765b8f77bbbb06cb0c84c886380b336774a49ac017471667ae6352a
MD5 bda60cb841e0a5a49b848fb59aebeae1
BLAKE2b-256 bd4ec05266010f03f1189727fadf3e5e90ea01f2877bf49a4c7a8bd24401f2d4

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