title: I am getting syntax error in python while using Speech-recoginition
body: <pre><code>data = ""
  
  try:
      # Uses the default API key
      # To use another API key: `r.recognize_google(audio, key="GOOGLE_SPEECH_RECOGNITION_API_KEY")`
      data = r.re[enter image description here][1]cognize_google(audio)
      print("You said: " + data)
  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 data
  </code></pre>
  
  <p>I am getting this error</p>
  
  <pre><code>return data
  </code></pre>
  
  <p>File "", line 13
      return data
      ^
  SyntaxError: 'return' outside function</p>