Hacking the Google AIY Voice Kit Part 2 - Voice Control

  Рет қаралды 42,085

DroneBot Workshop

DroneBot Workshop

Күн бұрын

Using the Google AIY Voice Kit to control your own devices, including motors and LEDs.
Get the code at dronebotworkshop.com/hacking-...
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/
Google AIY Voice Kit Part 1 Video at • Hacking the Google AIY...
In the second part of the Google AIY Voice Kit series, I’ll take the voice kit out of the cardboard box and put it onto a custom Raspberry Pi experimenters breadboard. Yes, I’m thinking outside of the box today!
Once I free the AIY Voice Kit from the confines of its cardboard box I’ll discuss the AIY Voice HAT (Hardware Attached on Top) board, which is the heart of the voice kit. We’ll solder some connectors to our HAT to make it more useful. I’ll also show you another inexpensive HAT you can use if you can’t get your hands on a Google AIY Voice Kit.
Next, I’ll show you how to configure the Google Cloud Speech API so that you can begin to develop your own voice-controlled projects. We’ll start with a few examples that Google has provided and then modify them to make our own unique devices.
Speaking of unique, how about a voice-controlled traffic light? Now to be fair this one just uses three LED’s on a breadboard so you won’t be able to control the traffic in your neighborhood but it’s an amusing device nonetheless. It also uses the “OK Google” wake word as opposed to other projects that you may have seen that require you to push the button before you speak. And it’s really easy to build and code.
After that, we will use our voice to control the speed of a DC motor. I’m sure you can come up with many uses for that.
Here is a breakdown of what is covered in this video:
00:00 - Introduction
02:47 - AIY Voice HAT
09:50 - Raspberry Pi Breadboard -
12:27 - Google AIY 2018 Raspbian Update
16:30 - Google Speech API
24:00 - Cloud Speech Demo with Button Trigger
26:19 - Cloud Speech Demo with “OK Google” Trigger
33:46 - Voice Controlled “Traffic Light” (with LEDs)
41:21 - Voice Controlled DC Motor
As always there is a complete article that includes all of the Python code on the DroneBot Workshop website. Look for the Resources box at the end of the article and download the ZIP file - it's easier than copying the code from the listings.
Hopefully, this video will inspire you to build your own voice-activated devices!
And if you haven’t subscribed to the channel yet please do!

Пікірлер: 88
@GaryGuerin
@GaryGuerin 5 жыл бұрын
Thanks for all you are a great teacher with very interesting projects! I really look forward for part 3 ! Among other things or course !😀
@garethhughes9827
@garethhughes9827 6 жыл бұрын
Fantastic tutorial, many thanks. Can't wait for Part 3!
@tpobrienjr
@tpobrienjr 6 жыл бұрын
Bill, you are doing a great job with this channel. Google AIY is a very heavy subject and you have nailed it for me.
@phmiii
@phmiii 6 жыл бұрын
Amazing work! I cannot wait until Part-3. I am going to put my Voice Kit into a mobile Robot. Thank you very much!
@jcallum
@jcallum 6 жыл бұрын
Great videos. I have just started with the voice kit and am finding this very helpful. Looking forward to future videos.
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Glad you enjoyed them John, I'll have another AIY Voice Kit video soon.
@johnlayman2836
@johnlayman2836 6 жыл бұрын
I really love you videos. They have helped me greatly. I'm using the first version of the AIY kit and was stumped by the changing locations of the files. If not for your videos, I would have given up. I'm ready for Part 3.
@quaternion-pi
@quaternion-pi 6 жыл бұрын
Fantastic, love your channel. Lots of fun experiments - thanks.
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Glad you enjoyed the experiments, plenty more on the way!
@smurfy_ch
@smurfy_ch 4 жыл бұрын
Great Workshop! Thanks very good work :o)
@stecduk
@stecduk 5 жыл бұрын
where is part 3?! good job btw.
@46pmw
@46pmw 6 жыл бұрын
I endorse other comments, the videos are great AND the supporting information on the DroneBot Workshop website makes the 'package' excellent. I appreciated the advice on the changes that Google has made (and likely will make) to the Speech API. As a former teacher of electronics, I've written lots of "How To" instructions, and I find the sequential documents make getting the job done much easier.
@johnlayman2836
@johnlayman2836 6 жыл бұрын
Great comment. I just completed the AIY Voice kit. There is a new version but I got the old one from Amazon without knowing it. Many things have changed and getting it to work was very challenging. The 1.5 hour kit took me about 8 hours to get to work. It's design for a 9 year old to be able to do. I feel bad for the 9 year old who tries. Especially difficult was the changing directory structure under SRC.
@looeplayallday5711
@looeplayallday5711 Жыл бұрын
thank you for all the videos
@tonythediyer8537
@tonythediyer8537 6 жыл бұрын
HI BIll, love the videos, keep them coming, subscribed! I notice a few errors here and there as well, but always forgivable when making videos, because they are easy to do, and by the time you notice them, you have already posted and it is too much trouble to fix. (From my own experiences ;) ) Keep up the great tutorials and hopefully you can build on projects to get more complex as you go (maybe an intermediate/complex playlist?) Love the shop layout and everything neatly tucked away in very nice order (wish I could get so organized). This series is proving to be very interesting, indeed.
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Yes you're correct Tony, I often spot errors myself but let them go in order to get the video out. As long as I don't make an error that causes someone to electrocute themselves, destroy a Raspberry Pi and/or burn down their home I figure it's OK! Once I get more content I'll work on some playlists (and I need to add cards to the videos, I know that too). Thanks for the nice comments about the workshop, always appreciated!
@bobvines00
@bobvines00 5 жыл бұрын
Bill, Sorry for the late comment but I'm playing catch-up after discovering your channel. Your explanations are very clear and I think I'll finally try Arduinos & RaspberryPis. It's a shame that you are getting so few "thumbs ups" from your viewers, especially when some videos get well over 100K views. I have to assume that these non-thumbs-ups are from folks that never give a thumbs-up to any video they watch. :( Please keep up these great videos, even if only beginners appreciate them.
@blakenorthrup
@blakenorthrup 6 жыл бұрын
Great videos, and very informative. How can you get the "assistant_library_with_local_commands_demo.py" to run automatically when the PI reboots?
@donniefontaine8018
@donniefontaine8018 5 жыл бұрын
Thank you very much for this! Can you recommend some resources for writing python programs to create custom functionality?
@victoryvada
@victoryvada 6 жыл бұрын
Hello , i was just wondering id you had to connect a H bridge to the dc motor set up how would the circuit look like , kindly let me know if possible , Great Video :D
@James-yf6jt
@James-yf6jt 6 жыл бұрын
as always..very informative...could you please do a video on sim900a /gsm shield. Do home automation with it, check the status of relays etc...
@LukaszAntos
@LukaszAntos 6 жыл бұрын
Thank you for the video
@marksseasalt5785
@marksseasalt5785 4 жыл бұрын
thank you for providing time stamps.
@ClaudeMcVea
@ClaudeMcVea 6 жыл бұрын
Great tutorial
@careyinouye5785
@careyinouye5785 6 жыл бұрын
Please more detail about connecting T Cobbler and Voice Hat to RPi. What board did you use that allows this?
@MrOzyreusz
@MrOzyreusz 6 жыл бұрын
Love your videos. BTW van i ask for a video about connecting arduino to raspberry pi for analog sensors and adding info from arduino to lets say trigger functions on voice hat? That would make my projects complete
@helloworld9789
@helloworld9789 6 жыл бұрын
can we use a 12v dc motor at the driver pins,by connecting 12 v batter at the jumper
@artzi555
@artzi555 6 жыл бұрын
Well done....like your vids
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Thank you, I like your comment!
@Bearskinbear
@Bearskinbear 6 жыл бұрын
Can you make a video teaching how to make a custom activation trigger? It's not clear in the Magpi Voice kit (pg 50) how to do the wiring
@zolatanaffa87
@zolatanaffa87 6 жыл бұрын
very nice and useful video, thanks for your shares, I'm learning a lot from you
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
You are very welcome, it makes me happy when someone is learning from my work.
@user-ne3gy1cy3s
@user-ne3gy1cy3s 6 жыл бұрын
Great!Thank you very much!
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
You are most welcome!
@fadhelmendili7359
@fadhelmendili7359 6 жыл бұрын
can I use it for recording my voice and after convert it to a file .txt for analyse this text using tensor flow
@MrOzyreusz
@MrOzyreusz 6 жыл бұрын
I would suggest recording your own wav files with status and instead of synthesizer you could run those waves
@unknotmiguel
@unknotmiguel 6 жыл бұрын
Can you increase the mic volume? Mine is a bit low, using the google voice hat. Tried alsamixer did not change.. because i notice that the capture volume of the recorder is higher than for the assistant
@Havjaa
@Havjaa 5 жыл бұрын
Still waiting for part 3.
@BrianMDowns
@BrianMDowns 5 жыл бұрын
I'm a complete noob with a Rasp Pi 3. I've got it working when I type in the commands to start. But is there a startup file that I can edit to make it into a stand-alone unit?
@ljdewaal7931
@ljdewaal7931 6 жыл бұрын
Dear Bill, First I want to thank you for these excellent tutorials about AIY, which are very good to follow for non native English speaking people. I tried to follow all your steps, but unfortunately I ran into a problem with your trafficlight example. When I try to run it I got the following error messages : Traceback (most recent call last): File "src/examples/voice/dbws_trafficlight.py", line 202, in main() File "src/examples/voice/dbws_trafficlight.py", line 196, in main with Assistant(credentials) as assistant: TypeError: __init__() missing 1 required positional argument: 'device_model_id' The assistant_library_with_local_commands_demo.py runs without problems. Have you any idea ?
@theanonymoustalk
@theanonymoustalk 5 жыл бұрын
are the servos only digital output or can you output analog data, for example to power an led strip (if this question sounds stupid or makes no sense then lmk)
@tubeDude48
@tubeDude48 4 жыл бұрын
What's the white material that you are using to mount the components?
@HowdyMyDudes
@HowdyMyDudes 6 жыл бұрын
Is there anyway to change the activation phrase, "Ok Google"? Or change the voice used to another voice like from female to male?
@dansdroids4067
@dansdroids4067 4 жыл бұрын
Have you looked at Mycroft or specifically Picroft for the RasPi?
@evilganji
@evilganji Жыл бұрын
I know that i'm here 5 year after the release of the video, but, did the part 3 ever came out? i can't find it... great video by the way.
@marcoreviews
@marcoreviews 4 жыл бұрын
Could you please help do a video on getting this to work pi Zero w? I tried the 2017, 2018 and 2019 builds but the only one that kind of works on pi zero w is 2018 however only the button light 💡 flashes however if you ask it questions it never replies... if you run the speaker and microphone test it is perfect... anyone know why? The same sd card works great with pi 3.
@trailwander5878
@trailwander5878 6 жыл бұрын
I enjoyed this video. Where in Canada do you live?
@bhuvaneshs.k638
@bhuvaneshs.k638 6 жыл бұрын
How to add web search to our agent
@amelliamendel2227
@amelliamendel2227 3 жыл бұрын
Can you use a different command word other than Google?
@andreamitchell4758
@andreamitchell4758 6 жыл бұрын
9:27 i don't really understand what the point of that jumper is , i mean why do they have it there at all? why not just make it permanently open , what would happen if you cut the jumper and end up not using the other power connection or the servo terminal? i get that if it is closed it will overdraw from the pi , but what is the disadvantage of just leaving it permanently open?
@skyrim4713
@skyrim4713 6 жыл бұрын
What if you don't want to use the cloud
@turu_unchained
@turu_unchained 6 жыл бұрын
Can you please put the model and the shop to buy the circuit board that allows you to put two different 40 pins connectors on, one for the hat and the other for the proto-board? thanks
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Sure. It's a "Pico HAT Hacker" from the good folks at Pimoroni - shop.pimoroni.com/collections/raspberry-pi/products/pico-hat-hacker. I added a 40-pin right-angled header and a 40-pin header with long leads to it for my prototyping area. You might also want to check their "pHAT Stack" which allows you to stack several HAT's onto a Raspberry Pi.
@jennyhart406
@jennyhart406 6 жыл бұрын
It is worth noting that the python code for local commands does not import aiy.cloudspeech and does not require you to set up the Cloudspeech API at all. I was not keen on setting up the paid API, even with the credit, and stumbled upon the fact it wasn’t required and have been running my local commands based script without issue.
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Now that's very interesting, I actually didn't know that. Thanks Jenny!
@troylanier
@troylanier 6 жыл бұрын
Does this mean that one can use local commands to control GPIO pins without needing to sign up for the Cloudspeech API?
@troylanier
@troylanier 6 жыл бұрын
This post is helpful: www.raspberrypi.org/forums/viewtopic.php?t=197605
@luisleal4169
@luisleal4169 6 жыл бұрын
That means you can use it locally without connecting to the cloud? can you share references or were you found it?
@solidshell0
@solidshell0 3 жыл бұрын
And for vector to?
@helloworld9789
@helloworld9789 6 жыл бұрын
awesome videos,is there gonna be a part 3.
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Yes indeed. There is a lot more to cover so stay tuned!
@helloworld9789
@helloworld9789 6 жыл бұрын
hope the video is out soon,love the channel :)
@buggz49
@buggz49 6 жыл бұрын
Bill, Thanks for the Video. One comment, in the Trafficlights section you add 22Ohm resistors. I believe the HAT already has them.
@buggz49
@buggz49 6 жыл бұрын
Have a look at Hacakaday. hackaday.com/2017/05/30/diy-google-aiy/
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
You are correct Dave, I wasn't aware of that. I just measured from the Servo 0 pin to GPIO 26 and it is indeed 220 ohms. So my traffic light could have been a lot brighter! Thanks for pointing that out, I learned something new!
@buggz49
@buggz49 6 жыл бұрын
Actually,I'm a bit dissappointed in Google for not making the Schematic available, there's a lot that could be done with the HAT, but you need to dig around to find things out. E.g. the PCB has space for another Speaker, so how do you change to Stereo? And like you found, you quickly discard the box when you want to plug other things in.
@andreamitchell4758
@andreamitchell4758 6 жыл бұрын
they should just do their AIY API like amazon does its AWS you don't get charged unless you publish it to everyone and get millions of uses
@PrismWarp
@PrismWarp 6 жыл бұрын
Yes I was wondering how do you get the Raspberri Pi to autostart the Google AIY on boot up and not have to go into the dev environment to start every time by use of a keyboard and monitor or having to remote VNC into the Raspberri to see the desktop.
@PrismWarp
@PrismWarp 6 жыл бұрын
After playing around awhile I ended up figuring out what I had to edit to get the AIY Project Demo to auto start on boot.
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Sorry to take so long to get back to you, glad you figured it out. Did you end up using a crontab with an @reboot directive? Perhaps you can share your solution here so that others might benefit from your knowledge, I'm sure it would be appreciated by many.
@PrismWarp
@PrismWarp 6 жыл бұрын
I watched many KZfaq videos on methods of getting the Google Assistant to auto-start using the headless version of the Google Assistant but none explaining how to do it with the Google AIY project using the hat. What I ended up doing and it appears to work was SSH into the Pi or if you have access to the Pi Desktop terminal, issue the command and the prompt: sudo nano .bashrc this pulls up the Pi's boot file, scroll down to the very end of the file and add the following two lines of code to the very bottom. cd /opt/aiy/projects-python/src/examples/voice assistant_library_demo.py Once added do a Control ^o to write and save the file then Control ^x to exit out of the file. Reboot the Pi and it will now start up the demo. This also is based on that you upgraded your Pi to at least the 2018 AIY image since they changed the folders the AIY Project now reside in. Hope this helps ....
@lulumumuful
@lulumumuful 6 жыл бұрын
I still have huge problems with the autostart of a file. I followed these steps: aiyprojects.withgoogle.com/voice/#makers-guide-3-4--run-your-app-automatically (it does not work for me with the current image) and now I tried your way but my sudo nano .bashrc creates an empty file.... What am I doing wrong?
@PrismWarp
@PrismWarp 6 жыл бұрын
Lisa the .bashrc file is not being created it already exists in the pi's home directory. If you type in sudo .bashrc then hit enter and you have no text that tells me your in the wrong folder or you did not include the PERIOD before bashrc. Your SSH prompt should look like this pi@raspberrypi:~ $ if it does not then type cd and hit enter that would move you into the pi's home folder. Once your in the home folder then do the sudo nano .bashrc command and it will pull up text around 40 lines long, you will then scroll to the bottom and add the two lines of text that I mentioned above. If your demo.py is in a different folder then the lines I told you to add will have to be altered to reflect that folder. I am assuming you are running the latest 2018 version of AIY. If not you should upgrade and take note once you flash the new firmware it will wipe out your SD card so make sure you copy your .JSON files as DroneBot Workshop suggests or you will have to redo your Google API's and if you have saved them you can copy them back over to the new firmware and the only thing you will have to do after is once the demo starts you will be prompted to reauthorize by typing in your Google account password. That link you sent me seem to complicated for just getting a program to auto start and I think it was on an older version since the folders they referred to no longer matched. Hope this helps...
@ufohunter3688
@ufohunter3688 6 жыл бұрын
Greetings from Ottawa. Thanks for sharing another interesting and useful video. I built an AIY kit a few months ago, but there are somethings wrong with it. I am not sure if its me, or others have the same glitches. I say "Hello Google, set a reminder in 3 minutes", she say "OK" after asking me to name the reminder, but she never comes back and remind! I never got past the demo code. It never stays up over night and hangs with the light either staying lit or sometimes the LED button stays off and hangs. I have to reboot the RPi3. I've shelved it for now and started other projects. I am hoping that its some bug somewhere and they will fix it in a few months, but can't be sure of that either. Any ideas? Can you check yours to see if the reminder does come back and remind? Thanks and Cheers.
@ufohunter3688
@ufohunter3688 6 жыл бұрын
I suspected the power supply and changed to a 3A supply with the same exact problems. :(
@csowm5je
@csowm5je 6 жыл бұрын
I just tried it with google home and it never reminded either.
@ufohunter3688
@ufohunter3688 6 жыл бұрын
I think it has many many bugs. You can't sign-in using the default browser (chromium) onto your google account either. I had to install FireFox to be able to even sign-in to my gmail account. Installed the new version of the OS today after watching this video, and its so cryptic now too. All the docs are irrelevant and none of the samples are working. I shelved it again :(
@Dronebotworkshop
@Dronebotworkshop 6 жыл бұрын
Greetings back from Montreal, sorry to take so long to reply (busy making more videos for everyone). Interesting issue, I'll set a reminder on mine and see if I can duplicate the issue.
@ufohunter3688
@ufohunter3688 6 жыл бұрын
Let us know. Looking forward to more videos from you.
@Allin7days
@Allin7days 5 жыл бұрын
I wish I could change the real traffic lights with my voice command. LoL
@squalazzo
@squalazzo 6 жыл бұрын
can the 5.5x2.1mm power connector be use as the only power source, not connecting the microusb connector? thanks
@Jerseylance1
@Jerseylance1 3 жыл бұрын
Hi there sir, nice video but I built a humanoid robot and want to give it a voice.
@IPushHard
@IPushHard 5 жыл бұрын
Im not setting up anything thats called "billing" just so I can play around with something. No way. No how. Not gonna happen. I also refuse to rely on Google to have to process everything I want to do. Who holds all the power there? Well, I'd say Google does. All they have to do is stop processing and they have shut me down. Cut the cord. Why give them that kind of power? ...when that's exactly what they are after? If the API does not reside on my system, I want no part of it. Its all part of Googles evil world domination plot. I dont want any part of that either. I could be joking about that...maybe. Sad part is that it makes everything in these videos moot where Im concerned. Thats unfortunate. : (
@donniefontaine8018
@donniefontaine8018 5 жыл бұрын
IPushHard Check out Mycroft. They’re working on a local server that will do all the processing. Your voice commands won’t even need internet access. I think development is in the early stages but it’s a good thing to keep an eye on.
@IPushHard
@IPushHard 5 жыл бұрын
@@donniefontaine8018 I'll definitely do that. Thanks!
Arduino Programming with XOD #2 - Robot Car
56:46
DroneBot Workshop
Рет қаралды 79 М.
Getting Started with LIDAR
47:27
DroneBot Workshop
Рет қаралды 1,4 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
One moment can change your life ✨🔄
00:32
A4
Рет қаралды 34 МЛН
Double Stacked Pizza @Lionfield @ChefRush
00:33
albert_cancook
Рет қаралды 81 МЛН
High Bypass Turbofan Engine Assembly - Educational Model
8:05
Raspberry Pi Google AIY Voice Kit
16:45
ExplainingComputers
Рет қаралды 195 М.
The nRF24L01 - Wireless Joystick for Arduino Robot Car with nRF24L01+
1:03:46
DroneBot Workshop
Рет қаралды 405 М.
Arduino Programming with XOD - Learning XOD
50:39
DroneBot Workshop
Рет қаралды 198 М.
The Truth About SIM Card Cloning
13:04
Janus Cycle
Рет қаралды 1,1 МЛН
How Wrong Is VERITASIUM? A Lamp and Power Line Story
19:17
ElectroBOOM
Рет қаралды 3,4 МЛН
Pixy2 Camera - Image Recognition for Arduino & Raspberry Pi
38:39
DroneBot Workshop
Рет қаралды 406 М.
DIY sonar scanner (practical experiments)
14:30
bitluni
Рет қаралды 1 МЛН
Не уступила место беременной и начались роды 😮
0:49
Фильмы I Сериалы
Рет қаралды 1,5 МЛН
Llegó al techo 😱
0:37
Juan De Dios Pantoja
Рет қаралды 49 МЛН
CAA Conversion kit at ZAHAL 🎯
0:14
Zahal Youtube
Рет қаралды 54 МЛН
smart appliances! new gadgets, versatile utensils, tool items #shorts #gadget
0:10
Pretty Balloon Family
Рет қаралды 56 МЛН