Skip to content Skip to sidebar Skip to footer

How Can I Make The Python To Wait Till I Complete Speaking?

I am writing a program to recognise the speech from a microphone and the code will process accordingly. The code I wrote for this purpose is below. import speech_recognition as sr

Solution 1:

This method:

        engine.runAndWait()

waits for speech to complete. You need to use it not just after engine.say("Shall i open the Facebook page for you ?"), but also after engine.say("Hi How can i help you ?") instead of sleep

Post a Comment for "How Can I Make The Python To Wait Till I Complete Speaking?"