# Implement a real-time VAD

**URL:** <https://discuss.huggingface.co/t/implement-a-real-time-vad/26800>\
**Category:** 🔒 Gradio\
**Created:** [November 27, 2022, 1:19pm UTC](https://discuss.huggingface.co/t/implement-a-real-time-vad/26800 "2022-11-27T13:19:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ziv-tamir](https://avatars.discourse-cdn.com/v4/letter/z/e47774/32.png) [@ziv-tamir](https://discuss.huggingface.co/u/ziv-tamir)\
**Post date:** [November 27, 2022, 1:19pm UTC](https://discuss.huggingface.co/t/implement-a-real-time-vad/26800/1 "2022-11-27T13:19:46Z")

</div>

Hey,  
I want to implement a real-time Voice Activity Detection.  
I want to stream audio and create matching plot that shows the probability of voice occurrence.  
I figured out how to stream audio using gr.Interface(fn=…, inputs=, output=, live=True) and also how to update plot using every. I would like the plot to be dependent on the audio.

Thanks!

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](https://discuss.huggingface.co/u/abidlabs)\
**Post date:** [January 21, 2023, 3:36am UTC](https://discuss.huggingface.co/t/implement-a-real-time-vad/26800/2 "2023-01-21T03:36:20Z")

</div>

Something like this should work:

```auto
gr.Interface(fn=…, inputs=gr.Image(streaming=True), output="plot", live=True)

```
