File size: 775 Bytes
9bd281a 2ce449c 9bd281a 2ce449c 08ac0b6 879174f 579ef03 9bd281a 2ce449c 9bd281a 2ce449c 9bd281a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
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) |