title: Speech Recognition Library in Python always returns same string
body: <p>I'm trying to use Google Speech recognition, My problem is that after saying something into microphone, results are always same.</p>
  
  <p>My Function looks like this</p>
  
  <pre><code>def RecordAudio():
      import speech_recognition as sr
  
      r = sr.Recognizer()
      with sr.Microphone() as source:
          print("Say something!")
          audio = r.listen(source)
  
      # Speech recognition using Google Speech Recognition
      try:
          print("You said: " + r.recognize_google(audio))
      except sr.UnknownValueError:
          print("Google Speech Recognition could not understand audio")
      except sr.RequestError as e:
          print("Could not request results from Google Speech Recognition service; {0}".format(e))
  
      return audio
  </code></pre>
  
  <p>When I'm trying to get data</p>
  
  <pre><code>data = RecordAudio()
  </code></pre>
  
  <p>Data is always equals to this 
  <strong>speech_recognition.AudioData object at 0x111a8b358</strong></p>
  
  <p>But what is strange for me is that, when this code is in one file, without function and without returning result, in that time this works.</p>
  
  <p>For example I've test.py file</p>
  
  <pre><code>import speech_recognition as sr
  
  r = sr.Recognizer()
  with sr.Microphone() as source:
      print("Say something!")
      audio = r.listen(source)
  
  # Speech recognition using Google Speech Recognition
  try:
      print("You said: " + r.recognize_google(audio))
  except sr.UnknownValueError:
      print("Google Speech Recognition could not understand audio")
  except sr.RequestError as e:
      print("Could not request results from Google Speech Recognition service; {0}".format(e))
  </code></pre>
  
  <p>This is working but first example not.</p>
  
  <p>Any idea what's happening ?</p>