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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lyriks_video-0.2.5.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.5.tar.gz
Algorithm Hash digest
SHA256 57932acd0e4ca41f7be10580895009a0d674b9e22096723af13279bd9df96257
MD5 574ce2d2d6479b79e767a01172da3327
BLAKE2b-256 dd3f4c5538b0da1f55a7a4075907864ecf67762a5649fdf08c99c0d5848dd731

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lyriks_video-0.2.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 39d098bd3fe32ea174faebdc5f1200591616fe36ded1877cf933b833c7d508db
MD5 9a71baa1bce7feda7f71a44b653bf03a
BLAKE2b-256 185e00c25a34593de6990e07d5f5f4e61324c57e191c3895b87e766e954c68c8

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