How does streamlit start a webhook/API and refresh the page upon receiving the request?

My scenario is to analyze the recording and output the text content to the page in real time.
But the recording is in real time. So is there any way to let streamlit open a webhook to receive this recording content and output it to the