audio-component / app.py
sanchit-gandhi's picture
Update app.py
cfb356d verified
raw
history blame
439 Bytes
import gradio as gr
def identity(audio):
print(audio)
return audio
with gr.Blocks() as demo:
with gr.Row():
with gr.Column():
audio_in = gr.Audio(sources=["microphone"], type="filepath")
run_button = gr.Button("Generate audio")
with gr.Column():
audio_out = gr.Audio(type="filepath")
run_button.click(fn=identity, inputs=[audio_in], outputs=[audio_out])
demo.launch()