Skip to main content

Google AIY voice kit v1

Enable the driver:

Edit/Add to /boot/config.txt:

dtoverlay=i2s=on
...
#dtparam=audio=on
...
# Google AIY voice kit v1
dtoverlay=i2s-mmap
dtoverlay=googlevoicehat-soundcard

ALSA configuration:

Create /etc/asound.conf:

options snd_rpi_googlevoicehat_soundcard index=0

pcm.softvol {
    type softvol
    slave.pcm dmix
    control {
        name Master
        card 0
    }
}

pcm.micboost {
    type route
    slave.pcm dsnoop
    ttable {
        0.0 30.0
        1.1 30.0
    }
}

pcm.!default {
    type asym
    playback.pcm "plug:softvol"
    capture.pcm "plug:micboost"
}

ctl.!default {
    type hw
    card 0
}

Reboot after editing asound.conf.

Verify:

Verify that the sound card's output and input is recognized with

aplay -l
arecord -l

Test:

Record a 5 second test.wav with:

arecord -c 2 -f cd -d 5 test.wav

Play test.wav with:

aplay test.wav

Pulseaudio

Install the pulseaudio package, and optionally pulsemixer for volume control. The microphone volume is low under the default ALSA driver, pulseaudio can 'overdrive' the source volume. 200-250% should be sufficent.

After installed, start the pulseaudio server with pulseaudio -D. List sources (inputs) with pactl list sources, note the index # of the soundcard, make sure it's not the null-monitor or loopback from the sink (output). Use that index number to increase the source volume, for example if the source index is #1: pactl set-source-volume 1 250%