DEV Community

Discussion on: How to convert Speech to text in Python

Collapse
 
balnamlah profile image
balnamlah • Edited

hello Mr. Jordan
Thank you a lot for this article, it helped me a lot in my project,
I have a question that I still didn't find an answer for it on google, could you help me with that, please

I am using the record method to record live audio from the microphone as the following:
audio = r.record(source, duration=200)
so the system will record for 200 minutes, then will stop recording and return the result
Is there a way to make the recording stop when user do action? like when user click "Stop" button, system will stop even if the 200 min is not finished?

Thanks a lot in advanced