renatotn7 commited on
Commit
2ce449c
·
1 Parent(s): 9bd281a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -1,24 +1,25 @@
1
  import os
2
  import gradio as gr
3
  from scipy.io.wavfile import write
4
-
5
-
6
  def inference(audio):
7
  os.makedirs("out", exist_ok=True)
8
  write('test.wav', audio[0], audio[1])
9
- os.system("python3 -m demucs.separate -n mdx_extra_q test.wav -o out")
 
 
10
  return "./out/mdx_extra_q/test/vocals.wav","./out/mdx_extra_q/test/bass.wav",\
11
  "./out/mdx_extra_q/test/drums.wav","./out/mdx_extra_q/test/other.wav"
12
 
13
- title = "Demucs"
14
- description = "Gradio demo for Demucs: Music Source Separation in the Waveform Domain. To use it, simply upload your audio, or click one of the examples to load them. Read more at the links below."
15
- article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1911.13254' target='_blank'>Music Source Separation in the Waveform Domain</a> | <a href='https://github.com/facebookresearch/demucs' target='_blank'>Github Repo</a></p>"
16
 
17
  examples=[['elianap1.mp3'],['elianap2.mp3'],['elianap3.mp3']]
18
  gr.Interface(
19
  inference,
20
  gr.inputs.Audio(type="numpy", label="Input"),
21
- [gr.outputs.Audio(type="file", label="Vocals"),gr.outputs.Audio(type="file", label="Bass"),gr.outputs.Audio(type="file", label="Drums"),gr.outputs.Audio(type="file", label="Other")],
22
  title=title,
23
  description=description,
24
  article=article,
 
1
  import os
2
  import gradio as gr
3
  from scipy.io.wavfile import write
4
+ os.system("git clone https://github.com/tungedng2710/TonSpeech.git")
5
+ os.system("cd TonSpeech")
6
  def inference(audio):
7
  os.makedirs("out", exist_ok=True)
8
  write('test.wav', audio[0], audio[1])
9
+
10
+
11
+ os.system("python se_cmgan.py --noisy test.wav")
12
  return "./out/mdx_extra_q/test/vocals.wav","./out/mdx_extra_q/test/bass.wav",\
13
  "./out/mdx_extra_q/test/drums.wav","./out/mdx_extra_q/test/other.wav"
14
 
15
+ title = "CMGAN"
16
+ description = "Gradio demo for cmgan: Music Source remocao de ruido "
 
17
 
18
  examples=[['elianap1.mp3'],['elianap2.mp3'],['elianap3.mp3']]
19
  gr.Interface(
20
  inference,
21
  gr.inputs.Audio(type="numpy", label="Input"),
22
+ [gr.outputs.Audio(type="file", label="Result")],
23
  title=title,
24
  description=description,
25
  article=article,