Azure speech continuous voice recognition from microphone
I am currently trying to write a python script that recognizes speech from a microphone using continuous recognition. I used the sample code from the Azure speech service (https://learn.microsoft.com/en-us/azure/ai-services/speech-service/how-to-recognize-speech?pivots=programming-language-python). However, my program never exits the while loop. How can I stop the recognition without typing in a command? Is it possible to stop the continuous speech recognition with a verbal command (e.g. a long pause or saying a keyword) ? I am trying to build a voicebot. Am I correct that in order to interact with the voicebot, users should either speak < 15 s (using single-shot recognition) or interact with the device after every utterance (using continuous recognition) ?
Thank you!