title: speech_recognition.RequestError: recognition request failed: Bad Request
body: <p>Has anyone gotten this error for the following code. I have seen many solution but none of them are working. Is there any solutions? I rememeber that I export the path of the python to somewhere else. Would this cause the problem?</p>
  <pre><code>import speech_recognition as sr
  
  r = sr.Recognizer()
  
  with sr.Microphone() as source:
      print('say something')
      audio = r.listen(source)
      voice_data = r.recognize_google(audio)
      print(voice_data)
  </code></pre>
  <pre><code>Traceback (most recent call last):
    File &quot;/research/venv/lib/python3.9/site-packages/speech_recognition/__init__.py&quot;, line 840, in recognize_google
      response = urlopen(request, timeout=self.operation_timeout)
    File &quot;/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py&quot;, line 214, in urlopen
      return opener.open(url, data, timeout)
    File &quot;/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py&quot;, line 523, in open
      response = meth(req, response)
    File &quot;/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py&quot;, line 632, in http_response
      response = self.parent.error(
    File &quot;/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py&quot;, line 561, in error
      return self._call_chain(*args)
    File &quot;/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py&quot;, line 494, in _call_chain
      result = func(*args)
    File &quot;/usr/local/Cellar/python@3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py&quot;, line 641, in http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
  urllib.error.HTTPError: HTTP Error 400: Bad Request
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/research/main.py&quot;, line 8, in &lt;module&gt;
      voice_data = r.recognize_google(audio)
    File &quot;/venv/lib/python3.9/site-packages/speech_recognition/__init__.py&quot;, line 842, in recognize_google
      raise RequestError(&quot;recognition request failed: {}&quot;.format(e.reason))
  speech_recognition.RequestError: recognition request failed: Bad Request
  </code></pre>