title: Google assistant SDK on RaspberryPi 3 - sounddevice.PortAudioError
body: <p>I get following error when I try to run Sample Google AI as in <a href="https://developers.google.com/assistant/sdk/prototype/getting-started-pi-python/run-sample" rel="nofollow noreferrer">Configure and Run the sample</a>-</p>
  
  <pre><code>(env) pi@raspberrypi:~ $ python -m googlesamples.assistant
  Traceback (most recent call last):
    File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/home/pi/env/lib/python3.4/site-packages/googlesamples/assistant/__main__.py", line 26, in &lt;module&gt;
      from googlesamples.assistant import (
    File "/home/pi/env/lib/python3.4/site-packages/googlesamples/assistant/audio_helpers/__init__.py", line 24, in &lt;module&gt;
      import sounddevice as sd
    File "/home/pi/env/lib/python3.4/site-packages/sounddevice.py", line 2787, in &lt;module&gt;
      _initialize()
    File "/home/pi/env/lib/python3.4/site-packages/sounddevice.py", line 2744, in _initialize
      _check(_lib.Pa_Initialize(), 'Error initializing PortAudio')
    File "/home/pi/env/lib/python3.4/site-packages/sounddevice.py", line 2671, in _check
      raise PortAudioError(msg)
  sounddevice.PortAudioError: Error initializing PortAudio: Unanticipated host API -10000 error 0: ''
  </code></pre>
  
  <p>Not sure if this is related. But, I also have a <em>arecord</em> issue-</p>
  
  <pre><code>(env) pi@raspberrypi:~ $ sudo arecord --format=S16_LE --duration=5 --rate=16k --file-type=raw out.raw
  arecord: main:722: audio open error: No such file or directory
  </code></pre>
  
  <p>Audio <strong>output</strong> testing as described in <a href="https://developers.google.com/assistant/sdk/prototype/getting-started-pi-python/configure-audio" rel="nofollow noreferrer">Google AI setup guide</a> works. Also, I have completed steps 2 to 4 described in link. It does not fix the error though.</p>
  
  <p>This command works -</p>
  
  <pre><code>(env) pi@raspberrypi:~ $ sudo arecord --format=S16_LE --duration=5 --rate=16k -D hw:1,0 --file-type=raw out.raw
  Recording raw data 'out.raw' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
  Warning: rate is not accurate (requested = 16000Hz, got = 44100Hz)
       please, try the plug plugin
  </code></pre>
  
  <p>Is there a solution to get this going? </p>
  
  <p>Thanks.</p>