Issue with `st.markdown` not displaying real-time transcription text in Streamlit

Hello Streamlit Community,

I am experiencing an issue where st.markdown does not update the transcription text in real-time in my Streamlit application. Despite the backend correctly capturing and updating the transcription text, the UI does not reflect these updates.

Debugging Information:

  1. Local or Deployed: I am running the app locally on my development machine.
  2. Deployment: Not applicable as the app is not currently deployed.
  3. GitHub Repository: GitHub - hassam4/streamlit-speech-to-text: Streamlit app that uses AssemblyAI's transcription service to provide real-time speech-to-text conversion, enabling users to see their spoken words translated into text instantly.
  4. Error Message: No specific error messages are generated, but the UI does not update with new transcription text as expected.
  5. Software Versions:
  • Streamlit Version: 1.12.0
  • Python Version: 3.9.7

In this setup, get_transcript() fetches the latest segment of the real-time transcript correctly (this has been verified through console logs). However, st.markdown() does not update the text on the UI as new transcripts become available.

Could anyone help identify why st.markdown() isn’t updating the UI or suggest any adjustments I might need to make?

Thank you for your assistance!

There is just one call to st.markdown in tour code:

st.markdown("This AI Assistant will transcribe your speech in real-time.")

Why would you expect this to update the text on the UI as new transcripts become available? There is nothing about the actual transcripts, old or new, in your call to st.markdown.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.