In order to do something like this, you'd have to run ASR (Automatic Speech Recognition) on the audio you're wanting to transcribe. This can get difficult, to do quickly on CPU-only devices. I've been working on a product that uses a feature like this for some of it's functionality, and have found pretty good results with some of the smaller models like Parakeet-TDT 0.6B. This model can run faster than real time on a Samsung S20 FE.