Kangarroar's picture
Update app.py
8274b52
raw
history blame
579 Bytes
import gradio as gr
s2t=gr.Interface.load('huggingface/facebook/s2t-medium-librispeech-asr')
def out(audio1,audio2):
if (audio1==None) and (audio2==None):
return "no audio","no audio"
elif audio1==None:
x=s2t(audio2)
return x, grammar(x)
else:
x=s2t(audio1)
return x, grammar(x)
iface = gr.Interface(
fn=out,
title="DIFF-SVC Cloud Rendering",
description="",
inputs=[gr.inputs.Audio(source="upload", type="filepath", label=None, optional=True)],
)
iface.launch(enable_queue=True,show_error=True)