title: Getting unwanted output in terminal with speech_recognition in Python
body: <p>I wrote this code using a library called &quot;speech_recognition&quot; wherein it uses the microphone to get what user speaks and print it out into the terminal.<br />
  This is what the code is:</p>
  <pre><code>import speech_recognition as sr
  import webbrowser as wb
  
  r1 = sr.Recognizer()
  r2 = sr.Recognizer()
  
  with sr.Microphone() as source:
      print('Give command')
      audio = r1.listen(source)
      command = r2.recognize_google(audio)
      print (command)
  </code></pre>
  <p>I would expect this to firstly <code>print('Give command')</code> followed by it listening to audio and printing out what it heard.<br />
  It does do that but this is the entire output I get when I say - &quot;hello please help&quot;:</p>
  <pre><code>ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
  ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
  ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
  ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
  ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
  ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
  ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
  Cannot connect to server socket err = No such file or directory
  Cannot connect to server request channel
  jack server is not running or cannot be started
  JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
  JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
  Cannot connect to server socket err = No such file or directory
  Cannot connect to server request channel
  jack server is not running or cannot be started
  JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
  JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
  ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
  ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
  ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
  ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
  Cannot connect to server socket err = No such file or directory
  Cannot connect to server request channel
  jack server is not running or cannot be started
  JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
  JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
  Give command
  hello please help
  </code></pre>
  <p>The last 2 lines of the output are the only things I want to see.</p>