speech recognition python code not working
Question: I am running the following code in Python 2.7 with pyAudio installed.

    
    
    import speech_recognition as sr
    r = sr.Recognizer()
    with sr.Microphone() as source:                # use the default microphone as the audio source
        audio = r.listen(source)                   # listen for the first phrase and extract it into audio data
    
    try:
        print("You said " + r.recognize(audio))    # recognize speech using Google Speech Recognition
    except LookupError:                           # speech is unintelligible
        print("Could not understand audio")
    

The output gives a blinking pointer. That's it. Please help, as I am new to
this.


Answer: The possible reason could be that the `recognizer_instance.energy_threshold`
property is probably set to a value that is too high to start off with. You
should decrease this threshold, or call
`recognizer_instance.adjust_for_ambient_noise(source, duration = 1)`. You can
learn more about it at [Speech
Recognition](https://github.com/Uberi/speech_recognition)

