title: What is this error- "IOError: [Errno 2] No such file or directory: 'audio.flac' ", i am trying to use the google voice recognition api for python
body: <p>Basically i want to convert speech to text, so I am trying to use the google voice recognition api for python.</p>
  
  <p>This is the code which i'm trying to run-</p>
  
  <pre><code>from pygsr import Pygsr
  speech = Pygsr()
  speech.record(3) # duration in seconds (3)
  phrase, complete_response = speech.speech_to_text('es_ES')
  print phrase # This is the required output
  </code></pre>
  
  <p>I've installed all the modules correctly, so probably nothing is wrong with the modules, i am getting the following error-</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Python/google_voice.py", line 4, in &lt;module&gt;
      phrase, complete_response = speech.speech_to_text('es_ES') # select the language
    File "C:/Python\pygsr\__init__.py", line 49, in speech_to_text
      audio = open(file_upload, "rb").read()
  IOError: [Errno 2] No such file or directory: 'audio.flac'
  </code></pre>
  
  <p>Can somebody please tell me what am i missing. 
  Or please suggest any good speech to text conversion method for python.</p>