[toc]
I made the Google AIY voice kit without HAT. Thanks to great Hackaday article !
However some of the files are changed from 17/05/30. Some steps were changed from hackaday article and I changed the few things.
I tried AIY at 18/01/24 with newer image 2018/01/03
- Append USB Sound adapter
- Connect Microphone to adapter
- Connect Speaker to adapter
- (Under construction) audio amplifier
- (Under construction) mic and amplifier
- standard:
GPIO23 - button - GND
- (Under testing) standard(Optional):
GPIO?? - res - LED - GND
append a blacklist and a option then reboot.
blacklist snd_soc_bcm2835_i2s
options snd_usb_audio index=0
make default hw to plugin device, I really don't know alsa settings.
pcm.!default plughw:Device
ctl.!default plughw:Device
you can confirm it by aplay /usr/share/sounds/alsa/Front_Center.wav
too.
you might be got the error like invalid sample rate or channels
if you were wrong the settings.
- change I2S to USB audio, override the alsa parameters to point the USB audio
def __init__(self, output_device='default'):
output_device = "plughw:0,0"
self._output_device = output_device
def __init__(self, input_device='default',
channels=1, bytes_per_sample=2, sample_rate_hz=16000):
"""Create a Recorder with the given audio format.
...
"""
input_device = "plughw:0,0"
run check_audio.py
.
- for
Register AIY kit to Google Assistant API
, you must update the SDK.
- I tried to use 4GB SD card for AIY kit, but there was no diskspace.
- remove these packages and got 300MB.
$ sudo apt remove minecraft-pi # ... about 5M
$ sudo apt remove libreoffice* # ... about 200M
$ sudo apt remove geany* # ... about 1M
$ sudo apt remove claws-mail* # ... about 1M
$ sudo apt remove python-thonny # ... about 1M
$ sudo apt autoremove
$ pip install --upgrade google-assistant-library
$ googlesamples-assistant-devicetool
- create new application on Google Client
see SDK document
- Enable Google Assistant API.
- Register AIY kit to Google Assistant API.
$ googlesamples-assistant-devicetool register-model --manufacturer "Assistant-SDK-developer" \
--product-name "Assistant-SDK-light" --type light --model [your-model-name]
$ googlesamples-assistant-devicetool list --model # confirm and get project_id from it.
$ googlesample-assistant-hotword --device_model_id [your-model-name] \
--project_id [your-project-id]
- o Bootup voice --- too mechanical voice, change to play a fanfire.
- ignoring pop noise from speaker at bootup
- LEDx8
- Swtich x4
- USB-HDD x2 and build NAS and mirroring
- install hd_idle for WD devices.
- to spin down the WD HDD, run
hd-idle -t disk/by-uuid/...
(remove /dev from path)
AIY is always turn-on in usual situation. So I measure some conditions with my watt meter.
Condition | avg. | max(W) |
---|---|---|
RasPi3 | 2.0 | 2.7 |
RasPi3 + HDMI + USB Keyboard(Dongle) | 2.0 | 2.7 |
RasPi3 + Assistant launched | --- | --- |
RasPi3 + Assistant + HDDx2 | --- | --- |
RasPi3 + Assistant + HDDx2 (spin down) | --- | --- |
RasPi3 + USB-HDD | 11.0 | 11.5 |
RasPi3 + USB-HDD (spin down) | 4.3 | 4.8 |
RasPi3 + USB-HDD (spin down) + Assist | 4.7 | 5.7 |
RasPi3 + USB-HDD (slow) | 7.5 | 7.8 |
RasPi3 + USB-HDD (spin up) | 14.0 | 14.0 |
RasPi3 + USB-HDDx2 (spin up) |
Don't worry, AIY does not spend the power too much! Enjoy use AIY.