# https://huggingface.co/spaces/lampongyuen/Gradio-Webcam-Streaming/blob/main/app.py (I thought needed video instead of Image) import gradio as gr import numpy as np import time def flip(im): return np.flipud(im) def dummyaudioprocess(aud): time.sleep(3) return aud with gr.Blocks() as realtimemedia: gr.HTML("Dual Audio and Image and processing test - With inspiration from - https://huggingface.co/spaces/lampongyuen/Gradio-Webcam-Streaming/blob/main/app.py (I thought needed video instead of Image)
End goal is SAM on live webcam + audio live with whisper
Live interface seems not to work in colab so dont debug there (doesnt work for me here, why?)" ) gr.Interface(flip, gr.Image(sources=["webcam"], streaming=True), "image", live=True) gr.Interface(dummyaudioprocess, gr.Audio(sources=["microphone"], streaming=True), "audio") #, live=True) realtimemedia.queue().launch()