Code Monkey home page Code Monkey logo

spleeter-web's Introduction

Spleeter Web

Docker Compose push

Spleeter Web is a web application for isolating or removing the vocal, accompaniment, bass, and/or drum components of any song. For example, you can use it to isolate the vocals of a track, or remove the vocals to get an instrumental version of a song.

It is powered by Spleeter, the awesome source separation library from Deezer. Specifically, it uses the pretrained 4stems-model model, which performs audio separation very well.

The app uses Django for the backend API, React for the frontend, PostgreSQL for the database, and Huey+Redis for the task queue.

Screenshot

Getting started with Docker

Requirements

Instructions

  1. Build and start containers using the development Docker config:

    > docker-compose -f docker-compose.yml -f docker-compose.build.yml -f docker-compose.dev.yml up --build
  2. Launch Spleeter Web

    Navigate to http://0.0.0.0:8000 in your browser.

Getting started without Docker

Requirements

  • 4 GB+ of memory (source separation is memory-intensive)
  • Python 3.6 or 3.7
  • Node.JS 12
  • Redis
  • PostgreSQL
  • ffmpeg

Instructions

  1. Configure PostgreSQL and Redis

    In django_react/settings_dev.py, update DATABASES['default'] to point to your PostgreSQL database.

    By default, it assumes you have a database called spleeter-web running on localhost:5432 with the user spleeter-web and no password.

    Next, ensure Redis is running on localhost:6379.

  2. Install Python dependencies

    > python3 -m venv env
    > source env/bin/activate
    > pip3 install -r requirements.txt
  3. Install Node dependencies

    > cd frontend
    > npm install
  4. Start backend and frontend servers (from project directory):

    Set DJANGO_DEVELOPMENT to use development setting overrides. By default it will use production values.

    > export DJANGO_DEVELOPMENT=true
    > npm run dev --prefix frontend & python manage.py runserver 0.0.0.0:8000
  5. In a separate session, start Huey worker (Redis should be running):

    > export DJANGO_DEVELOPMENT=true
    > export HUEY_WORKERS=1
    > source env/bin/activate
    > python manage.py run_huey
  6. Launch Spleeter Web

    Navigate to http://0.0.0.0:8000 in your browser.

Using cloud storage (Azure Storage, AWS S3, etc.)

By default, Spleeter Web uses the local filesystem to store uploads and separated songs. It supports many other storage backends like Azure Storage or S3 using django-storages.

You can edit django_react/settings_docker.py (if using Docker) or django_react/settings_dev.py and set DEFAULT_FILE_STORAGE to another backend like 'storages.backends.azure_storage.AzureStorage'.

If using Docker, create an .env file in the project root directory with the django-storages parameters corresponding to your cloud provider.

Example of .env using Azure Storage:

AZURE_ACCOUNT_KEY=<key>
AZURE_ACCOUNT_NAME=<account name>
...

If not using Docker, set the above values as environment variables.

Deploying

Spleeter Web can be deployed on VMs such as Azure VMs, AWS EC2, DigitalOcean, etc. Deploying to cloud container services like ECS is not yet supported out of the box.

  1. Clone this git repo

    > git clone https://github.com/JeffreyCA/spleeter-web.git
    > cd spleeter-web
  2. In spleeter-web, create an .env file with production environment variables

    .env file:

    APP_HOST=<spleeter-web.com>
    AZURE_ACCOUNT_KEY=<account key>
    AZURE_ACCOUNT_NAME=<account name>
    HUEY_WORKERS=<num workers>
    
  3. Build and start prebuilt production containers

    The following pulls prebuilt Docker images from Docker Hub:

    > sudo docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

    Alternatively, you can build the Docker images from source.

    > sudo docker-compose -f docker-compose.yml -f docker-compose.build.yml -f docker-compose.prod.yml up --build -d

spleeter-web's People

Contributors

jeffreyca avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.