prova / app.py
Pablo276's picture
Update app.py
3f28e88
raw
history blame
505 Bytes
import gradio as gr
import pesq
def calculate_mos_difference(ref_file, deg_file):
ref_mos = pesq.pesq(ref_file, ref_file, 'wb')
deg_mos = pesq.pesq(ref_file, deg_file, 'wb')
mos_difference = ref_mos - deg_mos
return mos_difference
audio_inputs = [
gr.inputs.Audio(label="Reference Audio"),
gr.inputs.Audio(label="Degraded Audio")
]
output = gr.outputs.Textbox(label="MOS Value Difference")
gr.Interface(fn=calculate_mos_difference, inputs=audio_inputs, outputs=output).launch()