Open sreekanthputta opened 4 months ago
Thanks. Is this the same feature request with #757?
Not really.
My change is about the speaker being able to stop the recording immediately after he is done speaking either by clicking transcribe button on my UI or releasing the mic button which held since he started speaking.
Add flush_flag to listener to flush the recorded audio immediately without waiting for the phrase to complete.
I am working on a real time speech to text application where I am kinda facing an issue. When the user is done talking, the speech_recognizer waits until the pause_threshold is elapsed. This gets even worse in noisy environments with the dynamic_energy_threshold turned off.
My users don't want to wait as they know that they are done talking. They want to be able to hit enter and reduce the time taken to show them the transcription.
This is just one example of where this could be helpful. I'm sure this feature can be useful in many ways.
I have tried
stopper
but, it takes a maximum of a second to stop but wont flush the audio. Also, the stopper wont stop the recorder when the audio is being actively recorded at the times whereenergy > energy_threshold
.Hence this change.
How to use?
Please feel free to modify the logic to make it more clean and robust. TIA. <|endoftext|>