title: why do i get this error "expection" every time i run my voice assistant?
body: <p><a href="https://i.stack.imgur.com/lMfZc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lMfZc.png" alt="enter image description here" /></a></p>
  <p>sometimes i get this error sometimes I don't it comes and goes, is there a way to fix? did i make a mistake somewhere in the code?</p>
  <pre><code>def audio():
      r = sr.Recognizer()
      with sr.Microphone() as source:
          r.adjust_for_ambient_noise(source, duration=1)
          audio = r.listen(source)
          said = ''
  
          try:
              said = r.recognize_google(audio)
              print(said)
          except Exception as e:
              print('expection: ' + str(e))
      return said.lower()
  
  text = audio()
  `
  </code></pre>