Audio.stream active flag

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?

1 Like