Skip to main content

Prepare for bulk karaoke video creation, by downloading audio and lyrics for top requests on karaokenerds.

Project description

KaraokeNerds Requests Prep 🎶

PyPI version

Prepare for bulk karaoke video creation, by downloading audio from YouTube and lyrics from Genius for top requests on karaokenerds.

This was created with a single use case in mind -

Features

  • Audio Fetching: Automatically searches YouTube for each song, downloads the top result and extracts the best quality audio in WAV format.
  • Lyrics Fetching: Automatically fetches song lyrics from Genius.com using LyricsGenius.
  • Audio Separation: Separates the downloaded audio into instrumental and vocal tracks, using audio-separator.
  • Multiple Audio Models: Runs audio separation with 2 different models (by default, UVR_MDXNET_KARA_2 and UVR-MDX-NET-Inst_HQ_3) to give you options for the backing track.
  • Easy Configuration: Control the tool's behavior using command-line arguments.
  • Organized Outputs: Creates structured output directories for easy access to generated tracks and lyrics.

Installation 🛠️

You can install KaraokeNerds Requests Prep using pip:

pip install karaokenerds-requests-prep

Usage 🚀

Command Line Interface (CLI)

You can use Audio Separator via the command line:

usage: karaokenerds-requests-prep [-h] [-v] [--log_level LOG_LEVEL] [--model_name MODEL_NAME] [--model_file_dir MODEL_FILE_DIR] [--output_dir OUTPUT_DIR] [--use_cuda]
                             [--use_coreml] [--denoise DENOISE] [--normalize NORMALIZE] [--create_track_subfolders]
                             [limit]

Fetch audio and lyrics for requests from karaokenerds, to prepare for bulk karaoke video creation.

positional arguments:
  limit                            Number of requests to fetch.

options:
  -h, --help                       show this help message and exit
  -v, --version                    show program's version number and exit
  --log_level LOG_LEVEL            Optional: logging level, e.g. info, debug, warning (default: info). Example: --log_level=debug
  --model_name MODEL_NAME          Optional: model name to be used for separation (default: UVR_MDXNET_KARA_2). Example: --model_name=UVR-MDX-NET-Inst_HQ_3
  --model_file_dir MODEL_FILE_DIR  Optional: model files directory (default: /tmp/audio-separator-models/). Example: --model_file_dir=/app/models
  --output_dir OUTPUT_DIR          Optional: directory to write output files (default: <current dir>/karaoke). Example: --output_dir=/app/karaoke
  --use_cuda                       Optional: use Nvidia GPU with CUDA for separation (default: False). Example: --use_cuda=true
  --use_coreml                     Optional: use Apple Silicon GPU with CoreML for separation (default: False). Example: --use_coreml=true
  --denoise DENOISE                Optional: enable or disable denoising during separation (default: True). Example: --denoise=False
  --normalize NORMALIZE            Optional: enable or disable normalization during separation (default: True). Example: --normalize=False
  --create_track_subfolders        Optional: create subfolders in the output folder for each track (default: False). Example: --create_track_subfolders=true

Example:

karaokenerds-requests-prep 10

This command will process the top 10 requests with the higest votes on Karaoke Nerds, downloading audio and lyrics for each and separating audio, ready for all 10 tracks to be created by whatever process you prefer for creating karaoke tracks!

Requirements 📋

Python <= 3.10 (one of the dependencies doesn't like 3.11 yet)

Libraries: onnx, onnxruntime, numpy, soundfile, librosa, torch, wget, six

Developing Locally

This project uses Poetry for dependency management and packaging. Follow these steps to setup a local development environment:

Prerequisites

  • Make sure you have Python 3.9 or newer installed on your machine.
  • Install Poetry by following the installation guide here.

Clone the Repository

Clone the repository to your local machine:

git clone https://github.com/YOUR_USERNAME/karaokenerds-requests-prep.git
cd karaokenerds-requests-prep

Replace YOUR_USERNAME with your GitHub username if you've forked the repository, or use the main repository URL if you have the permissions.

Install Dependencies

Run the following command to install the project dependencies:

poetry install

Activate the Virtual Environment

To activate the virtual environment, use the following command:

poetry shell

Running the Command-Line Interface Locally

You can run the CLI command directly within the virtual environment. For example:

karaokenerds-requests-prep 1

Deactivate the Virtual Environment

Once you are done with your development work, you can exit the virtual environment by simply typing:

exit

Building the Package

To build the package for distribution, use the following command:

poetry build

This will generate the distribution packages in the dist directory - but for now only @beveradb will be able to publish to PyPI.

Contributing 🤝

Contributions are very much welcome! Please fork the repository and submit a pull request with your changes, and I'll try to review, merge and publish promptly!

  • This project is 100% open-source and free for anyone to use and modify as they wish.
  • If the maintenance workload for this repo somehow becomes too much for me I'll ask for volunteers to share maintainership of the repo, though I don't think that is very likely

License 📄

This project is licensed under the MIT License.

  • Please Note: If you choose to integrate this project into some other project using the default model or any other model trained as part of the UVR project, please honor the MIT license by providing credit to UVR and its developers!

Credits 🙏

Contact 💌

For questions or feedback, please raise an issue or reach out to @beveradb (Andrew Beveridge) directly.

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

karaokenerds_requests_prep-0.2.0.tar.gz (10.8 kB view hashes)

Uploaded Source

Built Distribution

karaokenerds_requests_prep-0.2.0-py3-none-any.whl (10.6 kB view hashes)

Uploaded Python 3

Supported by

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