Computer Shopper - UK (2019-08)

(Antfer) #1

ADVANCEDPROJECTS


ISSUE 378|COMPUTERSHOPPER|AUGUST 2019 135


learning of natural language.Sorather than
having to read half ofAlice in Wonderlandto
your fully operational AIY Voice kit foritto
understand what you’re saying, it should
comprehend you immediately.
Or almost immediately,because you still
need to set up the software.The first step
is testing that the microphone and
speaker work. In the PuTTY SSH
window,enter΍home΍pi΍AIŴʟ
projectsʟpython΍checkpoints΍
checkϏaudio̲py,press Enter and
follow the instructions. If the
volume is tooloud, enteralsamiѸ
and use the arrow keys to lower the
volume; press Escape and re-run
the check_audio.pyscript.
Now you need to switch to aweb
browser and head to the Google
Cloud Platform,console.cloud.google.
com.Log in using your Google
account (or createone) and click on
the Select aproject menu at the top.
Select New Project, and then enter a
name before clicking Create. Once the
Google spinning thing has finished,
open the sidebar menu by clicking on


the three horizontal lines and then choosing
Library from the APIs &Services menu.
On the Libraries screen, search for
Google Assistant API, click the result
and then Enable.Afterafew seconds an

Overview screen will load; click the Create
Credentials button. Choose Google Assistant
API from the drop-down menu, then Other
UI (for example,Windows, CLI tool) from
the drop-down menu that appears. Next,
select User data under the What
data will you be accessing? section.
Then click the blue What credentials
do Ineed? button. This will produce
apopup called Set up OAuth consent
screen; click Set up Consent Screen.
This is adeparture from Google’s
instructions, which were out of date
at the time of writing.

WHAT’S INANAME?
The only piece of information to enter
is the Application name,which is the
public name of the project; we kept
this the same as our project name,
VoiceProj1. Once saved, you can return
to the Credentials wizard, which ought
to have opened, possibly in aseparate
browser tab.Onthis screen, again enter
your project name,and then click the
blue CreateOAuth client ID button. This
will generatealong string of characters,
which is your Client ID.Click the blue
Download button and aJSON file (which
stands forJavaScript Object Notation, just

learning of natural language So rather than the three horizontal lines and then choosing Overview screen


Rather than having to

readAliceinWonderland

to your AIY Voicekit

forittounderstand

whatyou’resaying, it

should comprehend

youimmediately

⬆The Pi slides intothe jaws of the cage using elements of the HAT
circuit board as guides. Notethat the Pi is almost flush with the ‘floor’of
the cage; if it’s not, you’ve constructed the cage the wrong wayround

you still
rst step

he

web

le.

on
p.
a
the

on

sel
dat
The
do
a
scr
Thi
ins
at

WH
The
is
pub
this
Voi
tothe
toha
browse
your
blueC
will g
which
Downlo
stands

➡The design of the box is just as
neat as the cage

Free download pdf