We can set the live parameter in interface:
demo = gr.Interface(
main_note,
gr.Audio(source="microphone", streaming=True),
gr.Text(),
live=True
)
How can we set live
with blocks ?
We can set the live parameter in interface:
demo = gr.Interface(
main_note,
gr.Audio(source="microphone", streaming=True),
gr.Text(),
live=True
)
How can we set live
with blocks ?
hi @laro1
here is an example using a Camera, but you can replace with the Audio
import gradio as gr
import numpy as np
def flip(im):
return np.flipud(im)
with gr.Blocks() as demo:
with gr.Row():
with gr.Column():
camera = gr.Image(source="webcam")
with gr.Column():
image = gr.Image()
camera.stream(fn=flip, inputs=[camera], outputs=[image])
demo.launch()