title: Speech recognizing in a loop
body: <p>I am trying to write a speech recognition code which takes voice from the microphone and process till a "Stop" is said. The code works for the first voice but then it gives an error. The code which I wrote is below:</p>
  
  <pre><code>import speech_recognition as sr
  import webbrowser
  r = sr.Recognizer()
  
  
  with sr.Microphone() as source:                
      while True:
          audio = r.listen(source)
          print("You said " + r.recognize(audio)) 
          if r.recognize(audio)=="Facebook":
              webbrowser.open('https://www.facebook.com')
          if r.recognize(audio)=="Google":
              webbrowser.open('https://www.google.co.uk')
          if r.recognize(audio)=="Stop":
              break
  </code></pre>
  
  <p>The error which I am getting is :</p>
  
  <pre><code>You said Facebook
  Traceback (most recent call last):
  File "C:/Work/Scripts/SpeechRecognition/Speech.py", line 9, in &lt;module&gt;
  print("You said " + r.recognize(audio)) # listen for the first phrase and extract it into audio data
  File "C:\Users\roradhak.NDS-UK\AppData\Roaming\Python\Python27\site-packages\speech_recognition\__init__.py", line 324, in recognize
  raise LookupError("Speech is unintelligible")
  </code></pre>
  
  <p>LookupError: Speech is unintelligible</p>
  
  <pre><code>Process finished with exit code 1
  </code></pre>