speechrecognitionthis package can be installed by using pip install speechrecognition google-speech-apiit can be installed by using the command pip install google-api-python-client example observe the following example to understand about recognition of spoken wordsimport the necessary packages as shownimport speech_recognition as sr create an object as shown belowrecording sr recognizer(nowthe microphone(module will take the voice as inputwith sr microphone(as sourcerecording adjust_for_ambient_noise(sourceprint("please say something:"audio recording listen(sourcenow google api would recognize the voice and gives the output tryprint("you said\nrecording recognize_google(audio)except exception as eprint(