Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.13.0
metadata
title: Music Separator Space
emoji: π»
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.34.1
app_file: app.py
pinned: false
license: mit
π΅ Music Source Separation Demo
This Gradio Space lets you upload any mono .wav music mix and instantly separate it into drums, bass, other, and vocals stems using a pretrained U-Net model.
π Try it live: https://huggingface.co/spaces/theadityamittal/music-separator-space
π οΈ How It Works
- Upload your mixture
.wav(16 kHz mono). - Internally, we compute an STFT and split it into fixed-length segments.
- A U-Net predicts magnitude masks for each source.
- We reconstruct each stem via inverse STFT using the original phase.
- Download your separated stems!
π§ Installation (Local)
If you want to run it locally instead of on the Space:
git clone https://huggingface.co/spaces/theadityamittal/music-separator-space
cd music-separator-space
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python serve.py
Then open http://localhost:7860 in your browser.
ποΈ Repository Structure
.
βββ serve.py # Gradio app entrypoint
βββ requirements.txt # Python dependencies
βββ config/
β βββ default.yaml # sample_rate, n_fft, hop_length, segment_length
βββ src/
βββ models/
βββ unet.py # U-Net architecture definition
βοΈ Configuration
Model checkpoint is automatically downloaded from the Model Hub:
https://huggingface.co/theadityamittal/music-separator-unetEnvironment variable
CHECKPOINT_PATHmay override the default path.
π License
This demo and the model checkpoint are released under the MIT license.
π Citation
If you use this demo or the model in your work, please cite:
@misc{music-separator-unet2025,
title = {Music Source Separation with U-Net},
author = {{Your Name}},
year = {2025},
howpublished = {\url{https://huggingface.co/<YOUR_USERNAME>/music-separator-unet}},
}