From 960e03be46345871d167d3db27b9a866c26f0c6f Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Wed, 24 Oct 2018 23:43:42 -0400 Subject: [PATCH] Add script to install AIY Voice HAT driver --- install-hat.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 install-hat.sh diff --git a/install-hat.sh b/install-hat.sh new file mode 100644 index 0000000..41afd29 --- /dev/null +++ b/install-hat.sh @@ -0,0 +1,16 @@ +echo "deb https://dl.google.com/aiyprojects/deb stable main" | sudo tee -a /etc/apt/sources.list.d/aiyprojects.list > /dev/null +wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - +sudo apt-get update + +sudo apt-get install pulseaudio +mkdir -p ~/.config/pulse/ +echo "default-sample-rate = 48000" > ~/.config/pulse/daemon.conf + +sudo apt-get install aiy-dkms aiy-voicebonnet-soundcard-dkms aiy-voicebonnet-routes + +echo "dtoverlay=i2s-mmap +dtoverlay=googlevoicehat-soundcard" | sudo tee -a /boot/config.txt > /dev/null +echo "blacklist snd_bcm2835" | sudo tee -a /etc/modprobe.d/alsa-blacklist.conf > /dev/null + +echo "Reboot your Pi to enable the AIY Voice HAT driver." +echo "If you want to test audio after rebooting, run the Python script $HOME/AIY-projects-python/src/checkpoints/check_audio.py"