# Audio.stream active flag

**URL:** <https://discuss.huggingface.co/t/audio-stream-active-flag/38194>\
**Category:** 🔒 Gradio\
**Created:** [April 30, 2023, 1:44pm UTC](https://discuss.huggingface.co/t/audio-stream-active-flag/38194 "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](https://discuss.huggingface.co/u/Shiry)\
**Post date:** [April 30, 2023, 1:44pm UTC](https://discuss.huggingface.co/t/audio-stream-active-flag/38194/1 "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?
