audiosep / README.md
Nekochu's picture
edit readme color
45cced5 verified

A newer version of the Gradio SDK is available: 6.12.0

Upgrade
metadata
title: AudioSep
emoji: 🎵
colorFrom: green
colorTo: purple
sdk: gradio
sdk_version: 6.3.0
app_file: app.py
pinned: false
license: mit
tags:
  - audio
  - source-separation
  - mcp-server
short_description: Separate any sound with natural language

AudioSep: Separate Anything You Describe

CPU inference for text-guided audio source separation.

Features

  • Natural Language Queries - Describe what you want to separate (e.g., "piano", "speech", "dog barking")
  • Zero-shot Generalization - Works on audio events, music instruments, speech, and more
  • CPU Inference - Runs on HuggingFace Spaces free tier

Usage

  1. Upload an audio file containing a mix of sounds
  2. Enter a text description of the sound you want to extract
  3. Click "Separate" and wait for processing

Examples

  • "acoustic guitar" - Extract guitar from a music mix
  • "speech" - Isolate human voice from background noise
  • "water drops" - Separate water sounds from other audio

API

Python Client

from gradio_client import Client, handle_file

client = Client("Luminia/audiosep")

result = client.predict(
    audio_file_path=handle_file("mixture.wav"),
    text="piano",
    api_name="/separate"
)
print(result)  # (audio_output, status_message)

REST API (curl)

# Step 1: Submit job
curl -X POST "https://luminia-audiosep.hf.space/gradio_api/call/separate" \
  -H "Content-Type: application/json" \
  -d '{"data": ["https://example.com/audio.wav", "piano"]}'

# Step 2: Get result (SSE stream)
curl "https://luminia-audiosep.hf.space/gradio_api/call/separate/{event_id}"

MCP (Model Context Protocol)

This Space supports MCP for AI assistants (Claude Desktop, Cursor, VS Code).

  1. Click MCP badge → Add to MCP tools
  2. The separate tool becomes available

Tool schema:

{
  "name": "separate",
  "parameters": {
    "audio_file_path": {"type": "string", "description": "Path to audio file (mixture)"},
    "text": {"type": "string", "description": "Text description of sound to separate"}
  },
  "returns": ["audio", "string"]
}

MCP Config:

{
  "mcpServers": {
    "audiosep": {"url": "https://luminia-audiosep.hf.space/gradio_api/mcp/"}
  }
}

Credits

Based on AudioSep by Audio-AGI.

Paper: Separate Anything You Describe