|
import os |
|
import gradio as gr |
|
from scipy.io.wavfile import write |
|
os.system("git clone https://github.com/tungedng2710/TonSpeech.git") |
|
os.system("cd TonSpeech") |
|
def inference(audio): |
|
os.makedirs("out", exist_ok=True) |
|
write('test.wav', audio[0], audio[1]) |
|
|
|
|
|
os.system("python ./TonSpeech/se_cmgan.py --noisy test.wav") |
|
os.system("ls") |
|
return "./data/CMGAN_exp/enhanced_test.wav" |
|
|
|
title = "CMGAN" |
|
description = "Gradio demo for cmgan: Music Source remocao de ruido " |
|
|
|
examples=[['elianap1.mp3'],['elianap2.mp3'],['elianap3.mp3']] |
|
gr.Interface( |
|
inference, |
|
gr.inputs.Audio(type="numpy", label="Input"), |
|
[gr.outputs.Audio(type="file", label="Result")], |
|
title=title, |
|
description=description, |
|
examples=examples |
|
).launch(enable_queue=True) |