title: ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
body: <p>I am trying to implement AI smart mirror project on raspberry pi3.. i have been stuck here for a long time.. i want to use camera microphone as a voice input source but i cannot.. if someone could help!?
  these are the errors while i run my python file</p>
  
  <pre><code>ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
  ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
  ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
  ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
  ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
  ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
  ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
  ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
  ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
  ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: 
  Connection refused
  
  ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: 
  Connection refused
  
  ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
  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
  I'm listening
  ^CTraceback (most recent call last):
  File "bot.py", line 254, in 
  bot.start()
  File "bot.py", line 43, in start
  recognizer, audio = self.speech.listen_for_audio()
  File "/home/pi/mirror/speech.py", line 37, in listen_for_audio
  audio = r.listen(source)
  File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", 
  line 559, in listen
  buffer = source.stream.read(source.CHUNK)
  File "/usr/local/lib/python2.7/dist-packages/speech_recognition/init.py", 
  line 161, in read
  return self.pyaudio_stream.read(size, exception_on_overflow=False)
  File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 608, in read
  return pa.read_stream(self._stream, num_frames, exception_on_overflow)
  </code></pre>