Write output of transcribe_mic to an output file

Please provide the following information when requesting support.

Hardware - Orin
Operating System - JP 5.0
Riva Version - 2.2.1

I am using GitHub - nvidia-riva/python-clients: Riva Python client API and CLI utils to perform ASR. I am using transcribe_mic.py under scripts/asr. I want the text for the speech received via the mic to an output file after every statement that it converts to text. This is because I have another application that reads this file to perform a function based on the input it gets from the file.
I have tried to include an output file name in transcribe_mic.py where it calls the print_streaming() function, but the file is not written until I exit out of the code using a ctrl+C.
Can anyone kindly help me?

Thank you,

Hi @raghavendra.ramya

Thanks for your interest in Riva,

I will try to perform/replicate your actions from my end, check and provide answers

Kind Regards,