Hey everyone!
Landed home today and had some more time to finalize the project. It's all working perfectly, even the logs look great! Got what I wanted. Now, the only thing left to do is to make a nice-looking pull request. I wanted to finish this task today, but it's 2:40AM and I should probably go to sleep to work better tomorrow. A demo also needs to be created and setting up the server can take some time.
Yesterday, I realized that threading actually worked in the application and that I had no idea why it didn't work prior to that. But it does work now! I learned that the subscribe() method is an asynchronous method, so to stop the stream in the most logical way possible, considering that it runs in a separate thread, I set up a blocking event using the threading library purposely.
This allowed for a smooth flow, as before that, the thread just finished executing but the pipeline was still executing in the background. Can be quite a bit confusing with how the resources are handled.
Which was exactly my question, since the transcription operation is heavy, is the thread still alive once it's done executing for the transcription operation to use its resources? Honestly, don't know. I also don't know how it works in asynchronous terms and what event loop it runs.
I found a way to gracefully stop the transcriptions and it's working great, no complaints at all. The transcriptions are being generated right until the end to the last of the audio chunks.
Since my commit history wasn't clean at all (Granted, I didn't use GitHub much before), I want to create a new branch and only add one single commit to it, which would be the working version and then work from there. This would be great in terms of commit history in my opinion.
So, for tomorrow, in terms of this specific project, I need to record a demo and create a pull request. That's it! Improvements will come later on of course :)
Loving this project and this journey! Glad to be back and to have the chance to work more on these projects.
Happy coding everyone!!
Top comments (0)