Skip to content

Instantly share code, notes, and snippets.

@maditnerd
Last active April 4, 2017 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maditnerd/6ec136d282a646f21f11691522df8242 to your computer and use it in GitHub Desktop.
Save maditnerd/6ec136d282a646f21f11691522df8242 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir /opt/snowboy
cd /opt/snowboy
wget https://s3-us-west-2.amazonaws.com/snowboy/snowboy-releases/rpi-arm-raspbian-8.0-1.2.0.tar.bz2
tar -xvf rpi-arm-raspbian-8.0-1.2.0.tar.bz2
apt-get install python-pyaudio python3-pyaudio sox libatlas-base-dev
pip install pyaudio
# Generate alsa configuration for root
cat > ~/.asoundrc << EOF
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "hw:0,0"
}
capture.pcm {
type plug
slave.pcm "hw:1,0"
}
}
EOF
rec test.wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment