stlukey/whispercpp.py

get progress updates from python

denizsincar29 opened this issue · 2 comments

Hello! I trying to make a gui voice transcriber in python but i couldn't figure out how to get progress of recognition.
Also, can I fix the small ggml model's spelling errors? Maybe with some apis...
Thanks in advance.

This would probably be quite hard as the C++ components are printing the progress directly to stdout. One hacking solution could be to redirect stdout to a variable in Python and use regex to find the transcription progress.
See: https://stackoverflow.com/questions/1218933/can-i-redirect-the-stdout-into-some-sort-of-string-buffer

This is probably a very poor solution as you would also have to periodically check the stdout in another thread as to not wait for the transcription to finish and it would also suppress all relevant information written to stdout.