Skip to content

A cross-platform desktop app for splitting songs into stems (vocals, drums, bass, instruments) using AI. Built with Tauri, React, and Python, it features a clean UI, fast processing, multiple output formats, and real-time progress tracking.

Notifications You must be signed in to change notification settings

LXMachado/audio-track-separator

Repository files navigation

🎵 Audio Track Separator

A powerful cross-platform desktop application for separating audio tracks into individual stems using advanced AI-powered source separation technology.

License Platform Version

📖 Overview

Audio Track Separator is a modern, cross-platform desktop application that leverages cutting-edge AI technology to separate music tracks into individual components (vocals, drums, bass, and other instruments). Built with Tauri, React, and Python, it provides a seamless user experience with professional-grade audio processing capabilities.

✨ Key Features

  • 🎯 AI-Powered Separation - Advanced machine learning algorithms for high-quality source separation
  • 🖥️ Cross-Platform - Native performance on Windows, macOS, and Linux
  • 🎨 Modern UI - Clean, intuitive interface built with React and Tailwind CSS
  • Fast Processing - Optimized backend powered by Python and FastAPI
  • 🎛️ Multiple Output Formats - Support for various audio formats and quality settings
  • 📊 Real-time Progress - Live processing status and progress tracking
  • 🌙 Dark/Light Mode - Customizable theme support
  • 🔧 Flexible Configuration - Adjustable processing parameters and output settings

🛠️ Tech Stack

Frontend

  • Tauri - Rust-based framework for building desktop applications
  • React 18 - Modern UI library with hooks and functional components
  • TypeScript - Type-safe JavaScript development
  • Tailwind CSS - Utility-first CSS framework
  • Lucide React - Beautiful & consistent icon library
  • Vite - Fast build tool and development server

Backend

Development Tools

  • Rust - Systems programming language for Tauri
  • ESLint - Code linting and formatting
  • PostCSS - CSS processing and optimization

📋 Prerequisites

Before you begin, ensure you have the following installed:

Platform-Specific Requirements

Windows

  • Visual Studio Build Tools or Visual Studio Community
  • Windows 10/11 SDK

macOS

  • Xcode Command Line Tools: xcode-select --install

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install -y gcc g++ libwebkit2gtk-4.0-dev libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev

🚀 Quick Start

1. Clone the Repository

git clone https://github.com/LXMachado/audio-track-separator.git
cd audio-track-separator

2. Install Frontend Dependencies

npm install

3. Set Up Python Backend

cd py-backend
pip install -r requirements.txt
cd ..

4. Run in Development Mode

npm run dev

This will start both the frontend and backend in development mode with hot reloading.

📦 Installation

Development Build

# Install dependencies
npm install
cd py-backend && pip install -r requirements.txt && cd ..

# Run development server
npm run dev

Production Build

# Build for production
npm run build

# The built application will be in src-tauri/target/release/

🎮 Usage

Getting Started

  1. Launch the Application

    • Run npm run dev for development
    • Or use the built executable for production
  2. Import Audio File

    • Click "Choose File" or drag & drop your audio file
    • Supported formats: MP3, WAV, FLAC, M4A, OGG
  3. Configure Separation Settings

    • Select output format and quality
    • Choose separation model (2-stem, 4-stem, 5-stem)
    • Adjust processing parameters if needed
  4. Start Processing

    • Click "Separate Tracks"
    • Monitor real-time progress
    • Wait for completion
  5. Download Results

    • Individual stems will be available for download
    • Choose output location
    • Enjoy your separated tracks!

Supported Audio Formats

Input Formats:

  • MP3 (.mp3)
  • WAV (.wav)
  • FLAC (.flac)
  • M4A (.m4a)
  • OGG (.ogg)

Output Formats:

  • WAV (recommended for quality)
  • MP3 (for smaller file sizes)
  • FLAC (lossless compression)

Separation Models

  • 2-stem: Vocals and accompaniment
  • 4-stem: Vocals, drums, bass, and other
  • 5-stem: Vocals, drums, bass, piano, and other

🏗️ Project Structure

audio-track-separator/
├── src/                          # React frontend source
│   ├── components/              # Reusable UI components
│   │   ├── ui/                 # Base UI components
│   │   ├── file-upload.tsx     # File upload component
│   │   ├── progress-display.tsx # Progress tracking
│   │   ├── stem-selector.tsx   # Model selection
│   │   └── ...                 # Other components
│   ├── lib/                    # Utility functions
│   ├── App.tsx                 # Main application component
│   └── main.tsx               # Application entry point
├── src-tauri/                  # Tauri backend (Rust)
│   ├── src/
│   │   └── main.rs            # Tauri main process
│   ├── tauri.conf.json        # Tauri configuration
│   └── Cargo.toml             # Rust dependencies
├── py-backend/                 # Python API server
│   ├── main.py                # FastAPI application
│   └── requirements.txt       # Python dependencies
├── public/                     # Static assets
├── package.json               # Node.js dependencies
├── tailwind.config.js         # Tailwind CSS configuration
├── vite.config.ts            # Vite build configuration
└── README.md                 # This file

⚙️ Configuration

Environment Variables

Create a .env file in the root directory:

# Python Backend
PYTHON_BACKEND_PORT=8000
PYTHON_BACKEND_HOST=localhost

# Processing Settings
MAX_FILE_SIZE_MB=100
DEFAULT_SEPARATION_MODEL=4stem
OUTPUT_QUALITY=high

# Paths
TEMP_DIR=./temp
OUTPUT_DIR=./output

Tauri Configuration

The application behavior can be customized in src-tauri/tauri.conf.json:

{
  "tauri": {
    "allowlist": {
      "dialog": true,
      "fs": {
        "readFile": true,
        "writeFile": true
      }
    }
  }
}

🧪 Development

Available Scripts

# Development
npm run dev              # Start development server
npm run build:frontend   # Build frontend only
npm run build           # Build complete application

# Tauri Commands
npm run tauri dev       # Start Tauri in development mode
npm run tauri build     # Build Tauri application

# Code Quality
npm run lint            # Run ESLint
npm run lint:fix        # Fix ESLint issues automatically

Development Workflow

  1. Frontend Development

    npm run dev
  2. Backend Development

    cd py-backend
    uvicorn main:app --reload
  3. Full Stack Development

    npm run tauri dev

Code Style

This project uses ESLint and Prettier for code formatting:

# Check code style
npm run lint

# Auto-fix issues
npm run lint:fix

🧩 API Reference

Python Backend Endpoints

POST /separate

Separate audio tracks

Request:

{
  "file_path": "string",
  "model": "2stem|4stem|5stem",
  "output_format": "wav|mp3|flac",
  "quality": "low|medium|high"
}

Response:

{
  "job_id": "string",
  "status": "processing|completed|error",
  "progress": 0.75,
  "output_files": ["path1", "path2", ...]
}

GET /status/{job_id}

Get processing status

Response:

{
  "status": "processing|completed|error",
  "progress": 0.85,
  "message": "Processing vocals...",
  "output_files": ["path1", "path2"]
}

🤝 Contributing

We welcome contributions! Here's how to get started:

1. Fork the Repository

git fork https://github.com/LXMachado/audio-track-separator.git

2. Create a Feature Branch

git checkout -b feature/amazing-feature

3. Make Your Changes

  • Follow the existing code style
  • Add tests for new features
  • Update documentation as needed

4. Commit Your Changes

git commit -m "Add amazing feature"

5. Push and Create Pull Request

git push origin feature/amazing-feature

Development Guidelines

  • Code Style: Follow ESLint and Prettier configurations
  • Commits: Use conventional commit messages
  • Testing: Add tests for new functionality
  • Documentation: Update README and inline docs

🐛 Troubleshooting

Common Issues

Build Failures

Issue: Tauri build fails on macOS

# Solution: Install Xcode Command Line Tools
xcode-select --install

Issue: Python dependencies not found

# Solution: Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r py-backend/requirements.txt

Runtime Issues

Issue: File upload not working

  • Check file permissions
  • Ensure supported file format
  • Verify file size limits

Issue: Processing stuck

  • Check available disk space
  • Monitor system resources
  • Review backend logs

Performance Optimization

  • Large Files: Use batch processing for files > 50MB
  • Memory: Close other applications during processing
  • Storage: Ensure 2-3x file size free disk space

📄 License

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

MIT License

Copyright (c) 2025 Audio Track Separator Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

🙏 Acknowledgments

📞 Support

Documentation

Community

Contact


⬆ Back to Top

Made with ❤️ and 🎵

About

A cross-platform desktop app for splitting songs into stems (vocals, drums, bass, instruments) using AI. Built with Tauri, React, and Python, it features a clean UI, fast processing, multiple output formats, and real-time progress tracking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published