
AI-Powered Object-Oriented Audio Separation
Describe the sound you want to extract or remove using natural language. Powered by Meta's SAM-Audio model.
https://github.com/user-attachments/assets/49248e25-0c56-46ab-a821-2de7f7016bb6
https://github.com/user-attachments/assets/6b8c08a8-c84f-4fc3-83ad-5703f474fc1b
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend β
β (Next.js + Tailwind v4) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β Backend API β
β (FastAPI + Python) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β Task Queue β
β (Celery + Redis) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β SAM Audio Lite β
β (Memory-optimized Meta SAM-Audio) β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
π‘ FFmpeg and Redis are automatically installed by the installer.
# Run installer (creates Conda env, downloads Redis, installs all dependencies)
install.bat
# Start all services with one click
start.bat
# Stop all services
stop.bat
Redis is automatically downloaded to redis/ folder by install.bat. If you prefer Docker:
docker-compose up -d
# Create new environment (Python 3.11+ required)
conda create -n audioghost python=3.11 -y
# Activate environment
conda activate audioghost
pip install torch==2.9.0+cu126 torchvision==0.24.0+cu126 torchaudio==2.9.0+cu126 --index-url https://download.pytorch.org/whl/cu126 --extra-index-url https://pypi.org/simple
conda install -c conda-forge ffmpeg -y
pip install git+https://github.com/facebookresearch/sam-audio.git
cd backend
pip install -r requirements.txt
cd frontend
npm install
Terminal 1 - Backend API:
cd backend
uvicorn main:app --reload --port 8000
Terminal 2 - Celery Worker:
conda activate audioghost
cd backend
celery -A workers.celery_app worker --loglevel=info --pool=solo
Terminal 3 - Frontend:
cd frontend
npm run dev
Navigate to http://localhost:3000
Tested on RTX 4090 with 4:26 audio (11 chunks @ 25s each)
| Model | bfloat16 (Default) | float32 (High Quality) | Recommended GPU |
|---|---|---|---|
| Small | ~6 GB | ~10 GB | RTX 3060 6GB / RTX 3070 8GB |
| Base | ~7 GB | ~13 GB | RTX 3070/4060 8GB / RTX 4070 12GB |
| Large | ~10 GB | ~20 GB | RTX 3080/4070 12GB / RTX 4080 16GB |
π‘ High Quality Mode (float32): Better separation quality but uses +2-3GB more VRAM. Enable via the "High Quality Mode" toggle in the UI.
| Model | First Run (incl. model load) | Subsequent Runs | Speed |
|---|---|---|---|
| Small | ~78s | ~25s | ~10x realtime |
| Base | ~100s | ~29s | ~9x realtime |
| Large | ~130s | ~41s | ~6.5x realtime |
π‘ First run includes model download and loading. Subsequent runs use cached models.
AudioGhost uses a "Lite Mode" that removes unused model components:
| Component Removed | VRAM Saved |
|---|---|
| Vision Encoder | ~2GB |
| Visual Ranker | ~2GB |
| Text Ranker | ~2GB |
| Span Predictor | ~1-2GB |
Total Reduction: Up to 40% less VRAM compared to original SAM-Audio
This is achieved by:
predict_spans=False and reranking_candidates=1bfloat16 precision by default (optional float32 for quality)audioghost-ai/
βββ backend/
β βββ main.py # FastAPI app
β βββ api/ # API routes
β β βββ auth.py # HuggingFace auth
β β βββ separate.py # Separation endpoints
β βββ workers/
β βββ celery_app.py # Celery config
β βββ tasks.py # SAM Audio Lite worker
βββ frontend/
β βββ src/
β β βββ app/ # Next.js app
β β βββ components/ # React components
β βββ package.json
βββ sam_audio_lite.py # Standalone lite version
βββ QUICKSTART.md # Quick setup guide
βββ README.md
Create a separation task.
Form Data:
file - Audio filedescription - Text prompt (e.g., "vocals")mode - "extract" or "remove"model_size - "small", "base", or "large" (default: "base")Response:
{
"task_id": "uuid",
"status": "pending",
"message": "Task submitted successfully"
}
Get task status and progress.
Download result audio (ghost, clean, or original).
model_size: "small" instead of "base" or "large"bin directory is in PATH.hf_token exists in backend/This project is licensed under the MIT License. SAM-Audio is licensed by Meta under a research license.
TypeScript
68.9%
Python
23.4%
Batchfile
4.3%
CSS
3.1%

AI-Powered Object-Oriented Audio Separation
Describe the sound you want to extract or remove using natural language. Powered by Meta's SAM-Audio model.
https://github.com/user-attachments/assets/49248e25-0c56-46ab-a821-2de7f7016bb6
https://github.com/user-attachments/assets/6b8c08a8-c84f-4fc3-83ad-5703f474fc1b
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend β
β (Next.js + Tailwind v4) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β Backend API β
β (FastAPI + Python) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β Task Queue β
β (Celery + Redis) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β SAM Audio Lite β
β (Memory-optimized Meta SAM-Audio) β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
π‘ FFmpeg and Redis are automatically installed by the installer.
# Run installer (creates Conda env, downloads Redis, installs all dependencies)
install.bat
# Start all services with one click
start.bat
# Stop all services
stop.bat
Redis is automatically downloaded to redis/ folder by install.bat. If you prefer Docker:
docker-compose up -d
# Create new environment (Python 3.11+ required)
conda create -n audioghost python=3.11 -y
# Activate environment
conda activate audioghost
pip install torch==2.9.0+cu126 torchvision==0.24.0+cu126 torchaudio==2.9.0+cu126 --index-url https://download.pytorch.org/whl/cu126 --extra-index-url https://pypi.org/simple
conda install -c conda-forge ffmpeg -y
pip install git+https://github.com/facebookresearch/sam-audio.git
cd backend
pip install -r requirements.txt
cd frontend
npm install
Terminal 1 - Backend API:
cd backend
uvicorn main:app --reload --port 8000
Terminal 2 - Celery Worker:
conda activate audioghost
cd backend
celery -A workers.celery_app worker --loglevel=info --pool=solo
Terminal 3 - Frontend:
cd frontend
npm run dev
Navigate to http://localhost:3000
Tested on RTX 4090 with 4:26 audio (11 chunks @ 25s each)
| Model | bfloat16 (Default) | float32 (High Quality) | Recommended GPU |
|---|---|---|---|
| Small | ~6 GB | ~10 GB | RTX 3060 6GB / RTX 3070 8GB |
| Base | ~7 GB | ~13 GB | RTX 3070/4060 8GB / RTX 4070 12GB |
| Large | ~10 GB | ~20 GB | RTX 3080/4070 12GB / RTX 4080 16GB |
π‘ High Quality Mode (float32): Better separation quality but uses +2-3GB more VRAM. Enable via the "High Quality Mode" toggle in the UI.
| Model | First Run (incl. model load) | Subsequent Runs | Speed |
|---|---|---|---|
| Small | ~78s | ~25s | ~10x realtime |
| Base | ~100s | ~29s | ~9x realtime |
| Large | ~130s | ~41s | ~6.5x realtime |
π‘ First run includes model download and loading. Subsequent runs use cached models.
AudioGhost uses a "Lite Mode" that removes unused model components:
| Component Removed | VRAM Saved |
|---|---|
| Vision Encoder | ~2GB |
| Visual Ranker | ~2GB |
| Text Ranker | ~2GB |
| Span Predictor | ~1-2GB |
Total Reduction: Up to 40% less VRAM compared to original SAM-Audio
This is achieved by:
predict_spans=False and reranking_candidates=1bfloat16 precision by default (optional float32 for quality)audioghost-ai/
βββ backend/
β βββ main.py # FastAPI app
β βββ api/ # API routes
β β βββ auth.py # HuggingFace auth
β β βββ separate.py # Separation endpoints
β βββ workers/
β βββ celery_app.py # Celery config
β βββ tasks.py # SAM Audio Lite worker
βββ frontend/
β βββ src/
β β βββ app/ # Next.js app
β β βββ components/ # React components
β βββ package.json
βββ sam_audio_lite.py # Standalone lite version
βββ QUICKSTART.md # Quick setup guide
βββ README.md
Create a separation task.
Form Data:
file - Audio filedescription - Text prompt (e.g., "vocals")mode - "extract" or "remove"model_size - "small", "base", or "large" (default: "base")Response:
{
"task_id": "uuid",
"status": "pending",
"message": "Task submitted successfully"
}
Get task status and progress.
Download result audio (ghost, clean, or original).
model_size: "small" instead of "base" or "large"bin directory is in PATH.hf_token exists in backend/This project is licensed under the MIT License. SAM-Audio is licensed by Meta under a research license.
TypeScript
68.9%
Python
23.4%
Batchfile
4.3%
CSS
3.1%