Spaces:
Sleeping
Sleeping
File size: 917 Bytes
b30187c e21dceb b30187c 5587ce2 b30187c 5dd1ae9 b30187c d3fc6e0 b30187c 6487182 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# 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) <br> End goal is SAM on live webcam + audio live with whisper <br> 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() |