Week 8 Blog: Continued Work on Implementing RealtimeSTT
April 27, 2025
Hello Readers!
This week I’ve been working on implementing the STT functionality into my website.
To properly implement STT, I needed to implement obtaining audio from the client side after pressing a button. I then needed to send the audio chunks to the server in order to transcribe them with RealtimeSTT. After transcription, I needed to send the text back to the client side to modify the text in the textbox. This would allow the user to modify the text in case the transcription had any problems.
I had to modify my system to allow for different types of websocket messages from the server. This was done by sending json strings instead of regular strings to the client side, which allowed from an extra “type” variable which I could read client side and perform different actions depending on its value.
While testing the code I also found a bug which did not allow me to continue sending messages after the first one. After looking into the code I realized I forgot to remove one line of code that closed the websocket connection, leading to the bug.
I have code that is capable of obtaining the audio from the client side. However, I still need to figure out how to use the button press to activate the functionality instead of having it be permanently active. I also have some code to transcribe the audio with RealtimeSTT, but I need to figure out which part of the code is necessary for my purposes and which isn’t as the example code has text color changing which I do not need. I have code to modify the text in the textbox but I need to finish the other parts in order to properly test it.
Overall, I should still be able to complete my project in time, and I hope to see you at the next blog!
Leave a Reply
You must be logged in to post a comment.