Aashiue's picture
Update app.py
37e9cb7 verified
raw
history blame contribute delete
643 Bytes
import gradio as gr
import librosa
import soundfile as sf
import numpy as np
from utils import run_separation
def separate_and_play(file):
separated = run_separation(file)
return separated['background'], separated['foreground']
demo = gr.Interface(
fn=separate_and_play,
inputs=gr.Audio(type="filepath", label="Upload Mixed Audio"),
outputs=[
gr.Audio(label="Background"),
gr.Audio(label="Foreground"),
],
title="Speaker Source Separation",
description="Upload a mixed audio file to hear separated background and foreground tracks using traditional audio separation methods."
)
demo.launch()