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

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

Uploaded Python 3

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

Hashes for lyriks_video-0.2.7.tar.gz
Algorithm Hash digest
SHA256 2c47c12590d2e6da5405414f2db403b0806ea76e2d1320291fb4dba2260e8429
MD5 10d6c3533dd768df4fec2d1817865956
BLAKE2b-256 b33beb2eed6a155310a5f06932caabbc1631ce9752d55d520fd540ba98a05c81

See more details on using hashes here.

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

Hashes for lyriks_video-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 998137bd0145f232ba270f3bad56f2dfeee3c94df9d7816f63c6cc477c5013ed
MD5 44362cfaca01b85d4ff0bbc0217b3af4
BLAKE2b-256 8210a45653a7c2e9ca671bc55b4532afc7a6b38b6f8a4d46c82287cc8e548ade

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