OpenAI Whisper C++ Raspberry Pi 5 Voice Assistant

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
red light on green light on red light off green light off all right it's working we got a Raspberry Pi 5 here in this video I'm going to show you how to control outputs using open AI whisper C++ model you can run this on a Raspberry Pi 5 or even with a couple adjustments run it on a pi4 the pi five will do up to the small model while the pi4 will just handle the tiny model and uh this video assumes that you've already installed whisper C++ I'll put the previous video in the description along with the software GitHub link all that stuff and this also assumes that you've installed the uh here's the GitHub this also assumes that you installed uh the gpiod libraries here's the hardware setup we have output 25 here in yellow this is 10 pins up on the right hand side of the 40 pin header this goes to the green l through a 220 Ohm resistor and then back through this orange wire here to ground and ground is three pins from the end here on the right and then similar similarly uh the um red LED is connected here to Output 24 which is 12 pins up from the right so two pins up from the uh output 25 5 there with a setup like this and a motor hat like this you could control all kinds of things like a little motor a buzzer so on and so forth and uh the possibilities are endless really I mean you can customize this to do whatever you want what's also nice about this setup is there's no way F words like you don't have to say Okay Google or Alexa do this Alexa do that you uh it'll just work as long as it's running there are two major adjustments that need to be made first is changing the make file to include a link to the gpiod library and that's on line 349 here and the key key is to include this at the very end- lgpi o otherwise if you don't do that you're going to get a linking error so that's the first CH change that needs to be made and then the second change that needs to be made is you go to examples stream and then you take the old default stream file and back it up old or whatever you want to do just so you have it and then copy this new stream file to where the old one used to be and I'll show you the changes in the new stream file here there's four changes and what I did was wherever there's a change I added a comment with three dashes here and you can use crlf to find those three dashes easily so the first part here is adding new libraries then down a little further there's the main function and this is the hardware functionality so here here are the outputs now of course you can add more outputs or do whatever you want here now one of the keys is for for the pi five you need this to be gpio chip 4 but for the pi 4 it needs to be GPO chip zero so just the heads up there then further down where the fun part happens is down here where you make your special phrases for example you say green light on and the model might output slightly different variations for example this one has a capital G this one here has a lowercase G sometimes there's a period sometimes there's no period so you put these all in parallel here and then you have your output here's where you set your output high so on and so forth so the cool thing here is you can make this do whatever you want to do and you can put any phrase you want to put in here so say motor on you could add motor on here's an example all lights on this turns all the lights on and then at the end close the chip so those are the four changes to this file that I posted on GitHub now once you made those changes then you got to compile everything make jream and to know that everything's linked properly you'll see here at the n l-l gpiod that means you're getting that link to the gpiod library which is great now if this isn't linked properly I'll show you what'll happen in a minute now if you didn't uh include that line in the make file the- lgpi you're going to see it's not included here in the comp filing process and then you get all these errors so make sure you do that otherwise it's not going to work you can run this on the Raspberry Pi 4 if you do make sure you you change GPO chip four to G to zero so this just gets changed from four to zero and then you can run it now if you're having some kind of performance issues here uh then you can add this NF at the end it's not going to be as accurate but just throwing it out there that's no fallbacks on the on the four Raspberry Pi 4 make sure you run the tiny model here so let's it let's run it testing one two red light on red light off red light off there we go it's not always super accurate sometimes it it does like do a repeat here which doesn't work the pi five is more accurate in General on the pi five we can run up to the base model and even the small model here but on the pi4 stick with the tiny model so let's run it the nice thing about this is that all the computation happens right here on the pi5 there's no API calls to the cloud there's no um you know you don't have to be connected the internet this would work anywhere in the world just stand alone it's all being done on edge so it's really cool and uh it's pretty accurate here with the base model and fairly quick it's a lot better than on the pi 4 all lights on well thank you for watching everybody I hope this will help you in your projects and uh take care all lights off
Info
Channel: Sam Wechsler
Views: 2,817
Rating: undefined out of 5
Keywords:
Id: jpW9foRIwv0
Channel Id: undefined
Length: 9min 6sec (546 seconds)
Published: Fri Dec 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.