#This is MY chatbot with voice recognition and api voice responce # if you don't want it to be speech based then swap the speak and listen part # with input and print and you are good to go # Tis one is for beginners , you may use deep learning response algorithms if #you want to improve the experience.
Here is what the above code is Doing:
1. It’s importing the required libraries.
2. It’s creating an instance of the Recognizer class.
3. It’s opening the microphone and listening for the user’s input.
4. Once the user said something, the program will recognize it and print it on the console.
5. The program will keep listening until the user says ‘stop’.