Skip to main content

A Python library for separating vokals and instruments from audio using Demucs.

Project description

🎤 vocals

vocals is a Python library that separates vocals and instruments from audio files using Demucs, a state-of-the-art deep learning model for music source separation. This tool is perfect for music enthusiasts, researchers, and audio engineers who want to isolate vocals for remixing, analysis, or karaoke tracks.

Features

•	Separate vocals and accompaniment from audio files with ease.
•	High-quality output using Demucs’ advanced deep learning models.
•	Simple, reusable interface for integration into other projects.

Installation

1.	Clone this repository or install it via pip:

pip install vocals

2.	Ensure you have Demucs installed. You can install it via pip:

pip install demucs

Usage

Here’s how you can use the library to separate vocals and instruments:

from vocals.separator import VocalSeparator

Initialize the separator with a specific output directory

separator = VocalSeparator(output_directory="separated_tracks")

Separate vocals from an audio file

input_audio_path = "/path/to/audio/file.mp3" # Replace with your file path try: output_path = separator.separate_vocals(input_audio_path) print(f"Separation complete. Files saved in {output_path}") except Exception as e: print(f"An error occurred: {e}")

Requirements

•	Python 3.7 or higher
•	Demucs
•	Other dependencies are automatically installed via pip.

Example

Input file: song.mp3 Output directory: separated_tracks/

After running the script, you’ll find two files in the output directory: 1. vocals.wav - Isolated vocals. 2. no_vocals.wav - Accompaniment without vocals.

Contributing

We welcome contributions! If you have ideas or want to improve this library: 1. Fork the repository. 2. Create a new branch (git checkout -b feature-name). 3. Commit your changes (git commit -m "Add feature"). 4. Push to the branch (git push origin feature-name). 5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

If you encounter any issues or have questions, feel free to open an issue on GitHub.

Acknowledgments

This library uses the incredible Demucs model for source separation.

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

vokal-1.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

vokal-1.0.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file vokal-1.0.0.tar.gz.

File metadata

  • Download URL: vokal-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for vokal-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1e978913669232a924aed2784c0aeb75f3dd07d74d449a65041fc1f9aa6c402a
MD5 52ae2a2ada9a6e3ec21641f32cd7f665
BLAKE2b-256 4eb975b1a47eb029eaf36120e173416f879f09d3ac28e362c0c3de93d6045730

See more details on using hashes here.

File details

Details for the file vokal-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: vokal-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vokal-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7dad7df77d6fabc59079973852483019eda99d2253bf3c0519634fbcaa6f2277
MD5 f96302726e20258f999f318579759442
BLAKE2b-256 8f78eb77d8873ffdccc113154a554c9e80309e8edaeb125a1568587773661788

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