Skip to content

Removes the music from an audio file, so that only the voices remain

License

Notifications You must be signed in to change notification settings

itkho/music-remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔇 Music remover
🚧 (WIP) 🚧


ℹ️ Description

Removes the music from an audio file, so that only the voices remain.

This API was built for Moubah.


💻 Tech Stack:

Python gRPC


🔗 Prerequisite


🔧 Setup

On Windows: use .exe (PowerShell recommended)

On Mac with Apple chip: use arch -x86_64 at the beginning of the command when indicated

Check that Python3.8 is correctly installed:

python3.8 --version

You may just have to use python.exe --version, without 3.8 on Windows


If you came from Moubah, make sure that the submodule is correctly imported:

git submodule update --init

Otherwise, just clone the repo:

git clone git@github.com:karim-bouchez/music-remover.git

And make sure you are in the music-remover directory:

pwd

Create and active a virtual environment:

# On UNIX OS:
python3.8 -m venv .venv
source .venv/bin/activate

# On Windows OS:
python3.8.exe -m venv .venv
.\.venv\Scripts\Activate.ps1

Upgrade pip:

[arch -x86_64] python[.exe] -m pip install --upgrade pip

If ModuleNotFoundError: No module named 'pip' error --> run python[.exe] -m ensurepip


Download 3rd party dependencies:

python[.exe] -m pip install requests
python[.exe] download_3rd_party_deps.py

If No such file or directory error --> run git submodule update --init


Install Spleeter manually:

  • for Mac with Apple silicon:
arch -x86_64 python -m pip install --upgrade spleeter-2.3.0b0-cp38-cp38-macosx_11_0_x86_64.whl
  • for other platforms:
python[.exe] -m pip install spleeter

Install other libraries:

[arch -x86_64] python[.exe] -m pip install -r requirements.txt

Generate gRPC code: TODO karim: store these files in Github and move this command in ~ "Contribution"

[arch -x86_64] python[.exe] -m grpc_tools.protoc --proto_path=src/protobuf --python_out=. --grpc_python_out=. src/protobuf/moubah.proto

🐍 Run it with Python

[arch -x86_64] python[.exe] app.py --host localhost --port 46471

🚀 Test it with Postman

You can access to the workspace here


📦 Create an executable file

[arch -x86_64] pyinstaller[.exe] app.spec --noconfirm --clean

☄️ Run the executable file

  • on Mac: (no need for arch -x86_64) (not working right now)
./dist/app/app --host localhost --port 46471

Apple Silicon: the executable file doesn't currently work
Error thrown:

malloc: Incorrect checksum for freed object 0x7f7a43d24280: probably modified after being freed.
malloc: *** set a breakpoint in malloc_error_break to debug
  • on Windows:
.\dist\music-remover.exe --host localhost --port 46471

🎯 To-do list

  • 🆕 fake a first request to avoid cold start and so the real first request is quick
  • 🧼 Clean: use strict version from spleeter
  • 🆕 Feature: add progress status or infos on downloading 3rd party

About

Removes the music from an audio file, so that only the voices remain

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages