I've made a web application using Flask (screenshot attached)(https://github.com/MusabbinJamil3/vosk-flask-app.git), I am trying to recognize audio using Vosk and route that text into my CK Editor. The problems that I am trying to solve are,
Flask app with Audio Recognition
My editor is being updated every time the model recognizes audio and it is not keeping previously written text
I have placed my fetch data function into a setInterval function in my html page. But this I feel like, is too intensive for any sort of website. Making an api call every second to reterive data from server (maybe it is common, I'm just a beginner). My interval is also running when I am not recognizing audio.
Usually my first go to is ChatGPT, but this seems to be what breaks it. It keeps giving the same answer by saying change this when that is already what it is...
I've tried using sockets to decrease the number of api calls, but that to no end. I've tried to make a new variable to store previous data and append data but I'm not sure how to do that. Even a link to a good tutorial on how to use routing with CK Editor would be appreciated.