# Audio.stream active flag

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faudio-stream-active-flag%2F38194%3E%5C
**Category:** 🔒 Gradio\
**Created:** [April 30, 2023, 1:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faudio-stream-active-flag%2F38194 "2023-04-30T13:44:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shiry](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Shiry](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FShiry)%5C
**Post date:** [April 30, 2023, 1:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Faudio-stream-active-flag%2F38194%2F1 "2023-04-30T13:44:28Z")

</div>

Hi,  
I am using gradio.Audio.stream(fn, ···).  
When the user clicks on “Record from microphone” the streaming starts and when the user clicks on “Stop recording” the streaming stops.  
I need to know that the streaming stopped in order to stop another thread.  
Can I catch this STOP event somehow or is there a flag somewhere indicating that the stream is ACTIVE or not?
