Essentials_AIY_Projects_Voice_v1.pdf

(11322 KB) Pobierz
ESSENTIALS
CREATE A VOICE KIT
WITH
YOUR
Written by
Raspberry Pi
Lucy Hattersley
ESSENTIALS
LEARN | CODE | MAKE
AVAILABLE NOW:
>
CONQUER THE COMMAND LINE
>
EXPERIMENT WITH SENSE HAT
>
MAKE GAMES WITH PYTHON
>
CODE MUSIC WITH SONIC PI
>
LEARN TO CODE WITH SCRATCH
>
HACK & MAKE IN MINECRAFT
>
ELECTRONICS WITH GPIO ZERO
>
LEARN TO CODE WITH C
>
THE CAMERA MODULE GUIDE
From the makers of the
official Raspberry Pi magazine
ESSENTIALS
ONLY
£3.99
raspberrypi.org/magpi
OUT NOW
IN PRINT
GET THEM
DIGITALLY:
ESSENTIALS
WELCOME TO
AIY PROJECTS
G
oogle AIY Projects brings do-it-yourself artificial
intelligence (AI) to the maker community.
AIY Projects is a series of open-source designs that
demonstrate how easy it is to add AI to your projects.
We are thrilled to present the very first project, a
kit that lets you explore voice recognition and natural
language understanding.
You will build a cardboard device that uses the Google
Assistant to answer questions, like “how far away is the
moon?” or “what is 18 percent of 92?”.
Then you will learn how to add voice commands to your
own projects. For example, you can register commands,
such as “turn the lights on” or “robot, turn right and move
forwards”. In the kit, Google has included a microphone,
a speaker, and an accessory board called Voice HAT, that is
loaded with breakout pins to wire up a variety of sensors
and components.
Google can’t wait for makers to build intelligent devices
that solve real-world problems and share them back to the
community using the #AIYProjects hashtag on social media.
Your kit is a fantastic way to add voice control to your
projects, and start exploring what’s possible with AI.
Lucy Hattersley
FIND US ONLINE
raspberrypi.org/magpi
EDITORIAL
GET IN TOUCH
magpi@raspberrypi.org
DESIGN
Publishing Director:
Russell Barnes
Editor:
Lucy Hattersley
lucy@raspberrypi.org
Sub Editors:
Rachel Churcher and Phil King
Critical Media:
criticalmedia.co.uk
Head of Design:
Dougal Matthews
Designers:
Lee Allen, Mike Kay
DISTRIBUTION
THE MAGPI SUBSCRIPTIONS
Select Publisher Services Ltd
PO Box 6337, Bournemouth
BH1 9EH |
+44 (0)1202 586 848
magpi.cc/Subs1
Seymour Distribution Ltd
2 East Poultry Ave, London
EC1A 9PT |
+44 (0)207 429 4000
In print, this product is made using paper
sourced from sustainable forests and
the printer operates an environmental
[
management system which has been
Chapter One
]
assessed as conforming to ISO 14001.
4
This book is published by Raspberry Pi (Trading) Ltd., 30 Station Road, Cambridge, CB1 2JH. The
publisher, editor and contributors accept no responsibility in respect of any omissions or errors relating
to goods, products or services referred to or advertised in this product. Except where otherwise
noted, content in this magazine is licensed under a Creative Commons Attribution-NonCommercial-
ShareAlike 3.0 Unported (CC BY-NC-SA 3.0). ISSN: 2051-9982. ISBN 978-1-912047-71-0.
[ AIY PROJECTS ]
ESSENTIALS
CONTENTS
06
[
CHAPTER ONE
]
MADE BY YOU
WITH GOOGLE
40
[
CHAPTER FIVE
]
BUILD A VOICE RECOGNIZER
Create a device that answers
your questions
[
LUCY
HATTERSLEY
]
The making of AIY Projects
11
[
CHAPTER TWO
]
YOUR AIY PROJECTS
VOICE KIT
Construct your Voice Kit
46
[
CHAPTER SIX
]
CREATE A VOICE
USER INTERFACE
FOR YOUR PROJECTS
52
[
CHAPTER SEVEN
]
CONTROL AN LED
14
[
CHAPTER THREE
]
ASSEMBLE THE KIT
Put the parts together
Voice control for your projects
34
[
CHAPTER FOUR
]
SET UP THE VOICE
ASSISTANT SOFTWARE
Create custom voice commands
for your projects
Download the software and
connect your device to the internet
60
[
CHAPTER EIGHT
]
ATTACH A SERVO
Control fine motor functions with
your Voice HAT and a servo motor
66
[
CHAPTER TEN
]
CONTROL A DC MOTOR
Attach a DC motor to your Voice HAT
and control it using voice commands
Lucy is the Editor
of The MagPi – The
Official Raspberry
Pi magazine. Her
first computer
was a Sinclair
Spectrum, but
Commodore was
her true love.
First with the
VIC-20, then the
C64, and finally
the adorable
Amiga. Lucy
learnt to code
at school using
Acorn computers;
then learnt it all
again with MITx.
Lucy has been
making computer
magazines since
she left school.
[
Contents
]
5
Zgłoś jeśli naruszono regulamin