Spaces:
Sleeping
Sleeping
File size: 621 Bytes
0154ff9 e607d6c 0154ff9 217b172 0154ff9 2039774 0154ff9 217b172 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import os
import gradio as gr
from scipy.io.wavfile import write
def inference(audio):
os.makedirs("out", exist_ok=True)
write('test.wav', audio[0], audio[1])
os.system("python3 -m demucs.separate -n mdx_extra_q --two-stems=vocals -d cpu test.wav -o out")
return "./out/mdx_extra_q/test/vocals.wav","./out/mdx_extra_q/test/no_vocals.wav"
title = "음성 분리"
demo = gr.Interface(
inference,
gr.Audio(type="numpy", label="Input"),
[gr.Audio(type="filepath", label="음성"),gr.Audio(type="filepath", label="배경음")],
title=title,
)
demo.queue(max_size=1)
demo.launch(debug=True) |