Build your own Local Echo for Home Assistant - Easier than you think!
Vložit
- čas přidán 4. 07. 2024
- Build your own Echo Replacement fro $50 or less. I also have a guide to go along with this video at : www.slacker-labs.com/setup-a-...
Other important Links:
Link to Home Assistant guide on setting up local Assistant Pipeline: www.home-assistant.io/voice_c...
Link to Original Walkthrough - github.com/rhasspy/wyoming-sa...
YAML Code Mentioned in video: github.com/thejeffreystone/Sl...
3d Printed Cases:
Smaller one - www.thingiverse.com/thing:470...
Bigger One - www.thingiverse.com/thing:476...
Affiliated Links:
Raspberry Pi Zero W 2 - amzn.to/4bonMNK
Raspberry Pi Zero W 2 Kit - amzn.to/4eI95Is
Respeaker 2 Mic Hat - amzn.to/3VGHVsK
Small Speaker - amzn.to/3RNKojT
Bigger Speaker - amzn.to/3zlhFwx
Hammer-in Headers - amzn.to/4cA20ro
Hammer in Jig - amzn.to/45L5Njr
Video Chapters:
00:00 - Build your own Local Voice Assistant for $50 - Intro
01:09 - Prereqs to build a local Voice Assistant
04:35 - Prep the Raspberry Pi Zero 2 W - Flash the OS
07:16 - Installing the software for the Wyoming Satellite - Step 0 - SSH Into the Pi
08:40 - Step 1 - Update the OS
09:04 - Step 2 - Install Git
09:27 - Step 3 - Clone Wyoming Satellite
09:52 - Step 4 - Install Respeaker Drivers
10:43 - Step 5 - Reboot
11:05 - Step 6 - SSH Back in to the Pi
11:24 - Step 7 - Install Wyoming Satellite Dependencies
12:05 - Step 8 - Test your Progress
12:33 - Step 9 - Make sure your ReSpeaker Hat is detected
13:10 - Step 10 - Record a test
13:43 - Step 11 - Playback Test Audio
14:09 - Step 12 - Make sure the Wyoming Satellite will run
14:56 - Step 13 - Create the Wyoming Service
16:25 - Step 14 - Enable the Service
16:41 - Step 15 - Check that Service is running
18:30 - Step 16A - Add Wyoming Satellite to Home Assistant
19:01 - Step 16B - Audio Enhancements
20:14 - Step 17 - Install Local Wake word Dependencies
20:51 - Step 18 - Clone Open Wake Word
21:31 - Step 19 - Setup Local Wake Word
21:56 - Step 20 - Create Local Wake Word Service
22:48 - Step 21 - Add Local Wake Word to Wyoming
24:36 - Step 22 - Test your Wake Word
25:03 - Step 23 - Enable the LEDs
26:31 - Step 24 - Create LED Service
28:59 - Button up Jarvis
29:43 - Jarvis - Setup your own commands
34:51 - Its not Perfect...
Correction:
07:03 You should really turn off the Pi before connecting the Pi Hat
Who am I?
My Name is Jeff. I am an DIY-er and Automator of boring things. And, of course, a huge Home Assistant fan. Oh, I also live in a house that tweets.
Follow Me:
Github - github.com/thejeffreystone
Twitter - / thejeffreystone / / slackerlabs
On the Web - slacker-labs.com/
Discord - / discord
And if you like this video you could always fuel my automation habit -
Buy a Slacker Labs T-shirt: slackerlabsmerch.square.site/
One Time Donation:
Paypal: www.paypal.com/paypalme/Slack...
Cash App: $slackerlabs
Buy me a coffee: www.buymeacoffee.com/icE6DeBut
.
Or use my Amazon affiliate link which provides a small commission on things you buy without additional cost to you - www.amazon.com/s/ref=as_li_ss... - Věda a technologie
WTF! You shouldn't hot-plug the hat on the Raspberry Pi! One wrong move/ping offset and you could let the smoke out. Even if everything is aligned correctly, you may not mate the, e.g., ground or other power pins in the right order and could cause excess currents to flow through signal pins into the Raspberry Pi GPIO connections.
Important safety tip.
How else am I supposed to light my Pi? I’m addicted to smoking Pi. 😙💨😶🌫️
We use our echo to play amazon music. Any thoughts on how one would integrate, or be able to do this. I also use nabacasa
@@EeveePotter There isn't a way to use these devices to play music on them. But if you wanted an interim solution, you could use the Alexa Media Player integration from HACS to create an automation that triggers using a voice command you define, and then have that Alexa Media Player Integration send a command to your echo to execute a silent command.
It would still require the Amazon cloud, but you could mute the Echo so it wasn't listening. So the only cmmand passed would be the one you send through the automation.
@@SlackerLabs aww true.. nice workaround. Appreciate you
6:45 lol, "That's what Paul said"... that is exactly what I was thinking when you said that. I heard Paul's high-pitched quivering "oh yeaaaah"
This is by far one of the best guides available right now. Let's hope the algorithm blesses you!
Thank you for this complete tutorial! I like you don't take shortcuts and exeplain everything that is needed. We use the Echo almost exlcusively to play music spotify. I still looking for complete guide to replace that feature of the Echo. There a lot of things to take into consideration which I cannot oversee, like music assistant, spotify, sonos and usable intents. Would be great if you could do a video on that!
I really enjoy your videos and particularly your sense of humor! Always provide a chuckle to two.
Thank you for direction as this is something I am wanting to do but just haven't got around to it. Now I will.
I subscribe two days ago when you first announced that you were going to do this. Happy I did!
This is really an awesome project!!! Missing one thing to make it perfect... Thank you so much for all your hard work and sharing!!! :)
Oh. Crap.
They are there now...
@@SlackerLabs Been there done that myself!! LOL Thank you so much!!
@@SlackerLabs I've tried this on two different setups and I cannot get even one of them to work..... NO fault of yours but I've been over this about 10 times and cannot get it working so I'm not really sure what comes next....
What is going on? Did the software go in the pi ok?
For the speaker cloth, maybe something like another ring that fits inside the lid to hold it stretched in place. Similar to how an embroidery hoop works.
This is a good idea as the friction of the speaker cloth should keep the ring friction locked inside the enclosed as well. Although I would probably put some ring catches in the enclosure anyway.
I use a combo of Home Assistant and Home Bridge for my setup, and I use Siri as my voice assistant. I mostly use Home Assistant to automate my retro console collection. For example, my SNES is connected to a smart socket, and the SNES's power switch is left in the on position, that way it's powered on anytime the smart socket is on. I then have a series of video switches and IR blasters handling all of the video stuff. Just say "Siri turn on Super Nintendo" and everything turns on, and switches inputs automatically. Couple that with an EverDrive, and wireless controllers, and it's like playing on a modern console. I currently have 19 game consoles automated in my setup.
thank you very much, im gonna try your alkthrough as others miss parts and then i get stuck at about C7.2 on your video. so im hoping your video walk thorigh helps more than others
SUPER PROJECT. Thank you!
FREE 3D printing at public libraries! Many have Maker Spaces/Idea Labs with 3D printers which will print ".stl" files. Since pre-pandemic, that's where I've been getting all my 3d print jobs done. AND, Jeff, thanks for giving me a kick in the @SS to get back into the HA voice control. I've tried with some success with a pi 3b+ or 4?. Currently want to get a ESP32-S3 board working. "Everything Smart Home" covered the latter in a video. I started on it, but, got side tracked. Either way, thanks for the great content as usual.
Good tutorial, the only thing I can see that should have been done is a ‘sudo apt upgrade’ after the first ‘sudo apt update’ to actually install the available updates. There were 44 available updates in your case that weren’t run.
Wish I could have used your affiliate links but they don't work for the uk, thanks for the guide, loving it, and bringing me one step closer to getting rid of Alexa
Nice - the option to use a separate speaker is what I was wondering before going into this video: I have a few Sonos Play 5s that I havent used in a while and wanted to upcycle, so this might do the trick - just gotta figure out how to power+mount the PI inside the enclosure of the device to make it look neat.
Thats a good point. You could totally use the audio jack and just plug that pi hat into any speaker that has the rca jack. I am going to try that with the Atom Echo, and will do an update video when I get that done.
@@SlackerLabs Gave it a try today since the parts arrived. On the video and screenshot on the guide, the OS image is listed as being the lite 64, but on the text of the guide it says legacy lite 64. For me this was important - the bookworm-based image failed to record any audio via arecord and the kernel logs had a bunch of errors related to initializing the hat's DAC (I've found similar complaints online); with the legacy/buster-based image, it works. (Seems this specific hat is considered unsupported/legacy :( )
Now to figure out why the commands seem to be dropped/ignored, even though the wakeword is handled, "assist in progress" turns on .. While text + microphone from my laptop works :/
Edit: I figured it out - turns out Assist doesn't like my Brazilian/English accent :P "Turn off main bedroom lights" got interpreted as "I don't have a better life", "Don't ask me, but I'll fight." and other silly interpretations 🤣🤣
My thought is the fabric stretches over the speaker grill and is glued with spray glue. Stretch the fabric to the bottom of the grill where it can't be seen. Give a little trim. Then a few magnets to hold the grill on or a screw from the bottom going into the grill. I bet making a little ring the entire grill could be shoved in(holds the fabric on while stretching) would also look pretty good. I might make it a second color to give a little accent.
I thought about the magnets. I feel like the top edge of this enclosure could be a bit taller. The top might in a bit better.
I think I may need to get that shir
Super cool but I have so many projects on the go already so will wait for the nabu casa hardware.
I get what you're saying. There is an abundance of home automation projects that are cool enough to build.
Thanks very much.
You don't need to type "apt-get" any more. The update command is simply "sudo apt update"
Please consider selling the enclosures. I don't have the room or the budget for 3d printing at the moment.
Love your videos.
There are Printing services that will ship you your custom 3D print. You usually just email them the stl file with your setting preferences and they get back to you with lead time and total cost with shipping.
I have this one, and also couple of ESP32-S3 based. I like latter more, since they're cheaper, smaller and easier to configure. :)
How well does the mic work?
@@SlackerLabs pretty good! I use one of that round MH-ET mics in custom device in my bedroom - it picks me from across the room easily, and in 2 months it's there it had only couple of false-triggerings. ESP32-S3-BOX is also pretty good.
@@formatBCEgot a link to that setup?
the big canister amazon echo fell from the counter a few days ago and broke the top off... I considered shooting it, but this is a better idea for its use.
Whoa...Nice!
On the Windows PC, you can just open a command prompt and use that for SSH. No need to install Putty
Command prompt? I think you need to use Powershell, right? Or maybe Microsoft made that possible in CMD now?
@@joe-skeen
No, I just use ssh from the command line
*you* could, but not everyone is as technical inclined. It's a guide for everyone.
@@Preske
I was just saying that you don't need to install putty. The same commands he's using work on Windows command prompt.
Yeah, I couldn't remember if it was a command or powershell on windows.
I use tiny drop of BluTac for that cover.
Oh. Good suggestion!
Got it running but it's definitely a bit slow right now and need to get it to be a bit faster to be a viable replacement for all house devices. Will try to figure out how to speed it up. Not sure the best options for that but thinking out loud:
- Using a more beefy raspberry pi (v4 or v5)
- Sourcing open wake word to the HA server
- Sourcing the open wake word to PC with GPU
After using it for a minute it seems to have sped up itself? Much better now. Definitely livable
@@VACInc I have noticed using home assistant cloud to the stt is slightly faster than using faster whisper. But if ha was running on faster hardware locally it should be faster n
This is a great projet but the process is way to complicated, this is something that hopefully home assistant is working on.
It is.
Thanks for the guide! Using a different device for providing the response is a great idea, since I'll probably set up a multi-room audio solution anyway and then only need to add a few mics around the place. I'm guessing there's a way to re-route the response to a specific speaker based on the mic that pickes up the wakeword, even without explicitly providing an automation for each sentence?
Yes. I actually have a bit of jinja that grabs the last jarvis entity triggered, gets the room, then routes the output to a google home in that room. So I can walk around and ask it where am I, and it will always play in the room I am in and tell me the room.
AWESOME VIDEO! Thank you! Can it be ran on a virtual machine or an ESP32?
This is fantastic, and perfectly timed! I've been looking to make a similar project.
What connectors did the speakers you bought have, in order to fit in your keyestudio ReSpeaker board? I want to make sure I get the right ones, to avoid the frustration of attaching new connectors.
Windows 11 has built in "Windows PowerShell" can use it and not putty. In they just type "ssh name@ip"
So I am wondering if you can take and put that. I'm like a ceiling speaker at all and and if it would be able to power it
I don't see why you wouldn't be able to do that
I've gone through so many of these types of videos only to find out they "depend" on some cloud service at the end that was set up and configured outside their "assistant" instructional video. Am I correct by saying this one requires another service? I got to the end where you had "Ok_Nabu" as the wake word, but you said you used "Jarvis"... both Nabu and Jarvis are additional add-ons?
It requires a local Assistant Pipeline setup in Home Assistant. In setting up that pipeline you decide which parts you use. This video setups up the Wyoming Satellite software with local wake word. So the Pi is running the the wake word detection, in my case I'm using "hey jarvis" as the wake word. Once the pi is triggered it sends the voice to the local assist pipeline. You can run faster-whisper on your Home Assistant as an add-on to handle speech to text, so your home assistant device decodes the speech into text, and then executes the command. Then for any response back you need a service that can do text to speech. I use the Nabu casea cloud, so that is the only cloud service I need. But you could run the piper add-on in home assistant to handle that and nothing would need the cloud.
You dont even need local wake word on the pi. Your home assistant local assist pipeline can handle that.
Can these be used as "media player" devices in HASS? It'd be awesome if, in addition to voice inputs and responses, it could also speak via a triggered automation.
They can't be as of yet. Perhaps down the road. I've been using the google homes for media player because I don't have to go through the google cloud. Can just stream to them over the local network.
A really GREAT video! I have one question, can this run totally "Local" with no internet in a basic mode, as I would like to build one for our RV which when boon-docking (no shore power/internet) . You mentioned cloud toward the end, I hope it is not needed. Keep the videos coming
It can run completely local. I'm using the cloud in this demo just for turning the text into speech. But if you want text to speech and want to keep it completely local Piper runs on your HA instance and can do text to speech.
So yes. If you have a HA instance running in your RV you could setup your local assistant pipeline so it never leaves yours RV.
@@SlackerLabs Thanks, I do have HA running
Great video. Is it possibly to get Assist to act on an Yes and No?
Like, an automation ask if I want lights in the kitchen. And I answer 'Yes', 'No'. Like the amazone alexa?
Not yet. At least that I know off. No way to have it trigger and listen in response.
even tho i use it myself, more out of habit than anything else: you dont need putty on windows anymore, you can just "ssh" inside of windows powershell!
Ordered the small speakers from your link and the plug didn't fit unfortunately. Its slightly too small for the Respeaker hat connector. I was able to force it in there though lol.
Really? Hmmm.
@@SlackerLabs it still works, it’s just that the pins on the Respeaker connector are slightly farther apart so the connector doesn’t quite go on well. I do have to thank you for the guide though. The step by step was very helpful!
I have Sonos speakers in many of my rooms, and I would like to use them as the speaker output for the Wyoming devices. Any pointers?
For those who have never set up a voice assistant in HA, first follow the steps on the HA support url under "voice_control" and "Installing a local assistant pipeline". I couldn't figure out why after all the steps I followed, my assistant would not respond or hear the wake word.
It wouldn't hear the wake word without the pipeline? It should hear the wake word but wouldn't be able to send the data anywhere without the pipeline.
I will have to double check.
@@SlackerLabs The RP heard it... as I could get the LEDs to respond, but within HA, it would not detect it (Assist in Progress). It all worked after installing piper, whisper in HA. I'm not sure which one did it, but, after that... success. Also the LEDs didn't respond correctly (they'd turn on, but not off). After the above, it worked and HA responded. I did the install of all your steps probably 3 or 4 times (very well organized.. and well done! thank you!). I also followed the steps directly from the wyoming github site too just to get more familiar with everything :)
So I tried similar approach but different. Used vanilla esphome firmware with some config, attached microphone and used external speaker (mediaplayer from HA) for feedback. All works great, sound quality on big home speaker is great, but not speech to text. It’s slow (I have HA running on virtual machine on qnap, but it’s not overloaded) and unreliable. TTS locally works fine, but not STT. I see you are using cloud and that what makes the difference…
It might. The STT using Nabu Casa is really good. I have pretty much switched over to using it.
It all most be easer if you could make a DD image to download. Then could set up your personal things. Like Wi-Fi and things. I been falling the step-by-step and got the hat with 2 mics but on the "Wyominig Satellite" Autodetect it can not find it. says you my have to restart it.
just ordered the atoms ... now a decision to make.... which 3d printer your use? I am very insterest in printing my own if you can add the file for printing that would be great. I would also consider a whole kit and pay you for your work.
the links to two different ones I printed should be in the description now. I have an Ender 5 Pro. I added some better bed springs, a PEI build plate, and a better bed heater which heats more evenly.
@@SlackerLabs i have the CR10 and the PRUSA Minil. I hate the CR10 had a bunch of mods and it is still a pain to print with. The mini is sweet. Should I stay with the atoms or go with the PI Zero?
@@retirednowwhat4292 Thats a good question. My only issue with the Atoms is there doesn't seem to be an easy way to get a really good sounding speaker on there. If you can solve that in a way that is acceptable I think the Atoms might be a good choice. Especially now that Micro Wake Word is a thing, and the team is working hard to get more of this software on the ESP devices. I think the mics on the 2 mic hat have better pickup than the Atom Echo. But that ins't a fair comparison.
Not a direct answer, but hopefully that helps with your thinking.
I built 4 of the ESP 32 versions. Once I buit 1 of the wyoming satellites, I trashed the 4 esp32 versions. The wyoming satellites with the Pi and 2 mic hat are just so much better and easier.
Tried your code for using M5stack as the mic and GH mini as the speaker, it didn't work. Do I need to add scripts elsewhere other than the config and automation yaml?
You shouldn't. As long as that m5 is linked to a pipeline that should be it. If you are using the conversation and or internet script for the first time you would need to restart HA I think.
Does it just say it doesn't understand when you try to use the sentence?
@@SlackerLabs No sir, the response still comes out of the atom and not my GH speaker. I do not understand why it fails to run. I'll re-upload the codes, run the automation, and check the logs. Can I message you through Discord the failure?
@the.kingant yes. I'll be online in a couple of hours. And yea. Make sure the automation is getting triggered.
Is it possible to play music off these speakers? And can they be put into groups if they can play music?
First I want to say great video, I used it and built one of my own, thank you,
next do you know how I can go about sending every voice command to mqtt?
I was able to accomplish this using ESP32s but not sure how id go about doing that with this. can you help?
So, I've built this before but ran into the issue of it crashing after a few hours. /var/log/messages doesn't really show anything. I don't know why it crashes all the time. Some things point to the SD card, but I tried a few. Going to get a more expensive one to see if that's the issue.
There are also issues if you update the Pi.. that's a problem. You end up with a TON of errors.
I have not seen that yet. But I will be on the look out for it
Wow this is the 4th time reinstalling it. The sound test works but when I get to the step C12.1 it never shows up in my Home Assistant. It looks just like your video up to then.
I got home Assistant that came installed on a ZimaBlade with CasaOS Not sure if that is why it's not showing up.
Do you have the Wyoming integration installed? That is what should do the auto detection. www.home-assistant.io/integrations/wyoming
@@SlackerLabs Can put my Home Assistant link in the web page you link to and it takes me to this on my Home Assistant "This redirect is not supported by your Home Assistant installation. It needs either the Home Assistant Operating System or Home Assistant Supervised installation method. For more information, see the documentation." Guess I need to copy and paste some script some were in Home Assistant or on the command line get a Host* and port* that it ask me for when I try and add Wyoming Protocol
This just seems way too complicated I've been working on it for 3 days best I know now I think I have to put some script someplace and the home assistant but I just don't know where to copy and
Just wanted to test on installing one part whisper. So on the command line were my home assistant is installed ran in to all sort of problems.
root@casaos:~# pip install -U openai-whisper
-bash: pip: command not found
root@casaos:~# apt install pip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'python3-pip' instead of 'pip'
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python3-distutils : Depends: python3:any (< 3.10)
Depends: python3-lib2to3 (= 3.9.2-1) but it is not going to be installed
python3-setuptools : Depends: python3-pkg-resources (= 52.0.0-4) but 66.1.1-1 is to be installed
E: Unable to correct problems, you have held broken packages.
root@casaos:~#
They need to make this easier.
@RaymondDay I'm not sure what casaos is. So perhaps it can't run the whisper addon.
Nice, but all of this can be done via a one Bash script or Ansible playbook. Faster and easier. Besides this way you are sure that there are no errors and replacement in playbook or script can be done thanks awk or sed commands. Thanks this approach next time you will record shorter video. Time is money. Anyway I appreciate it. Cheers.
Yeah, no doubt. I considered doing a single script. but if something went wrong along the way, most people would have struggled to figure out where.
@@SlackerLabs that is why there are if else where you can add conditions. I always do this for each step and also log each step to a log file. It is just a matter of experience. I can write both script and ansible playbook if you want. For sure I will try to build this and I was thinking about connecting it to fabric and self hosted LLM.
@sysadmin-info that's a good idea. I will play around with that and see if I can make something as well.
I threw my GFs Alexa away. She has no idea where it is.
So can this run micro wake word?
This one doesn't. I think microwakeword is for the esp devices. The pi can run the local wake word as long as it's a 64bit iOS
@@SlackerLabs no problem, thanks for letting me know. Should make a video of an esp with microwakeword
You dont need micro wake word on the Pi. You get the full local wake word.
@@Rich33527 thanks
Windows has WSL :)
No need for putty on modern windows. It should have ssh built in or the ability to enable that feature.
I'm all about awkward 😁
High five! I actually didn't think anyone would stick around that long. Haha.
I feel like your view & sub counts are lower than they should be.
Me too. Haha. Me too. CZcams. Just a weird beast.
First
Im software developer and i can say this was the HARDEST..dificult to even follow integration i ever seen.... the apposite of user friendly :D
Uhg, this again. As with local whole home audio from the year before (another half abandoned idea), the year of the voice was a complete and utter waste. Unreliable as all get out.
Thank goodness they're actually working on UX improvements now.
I'm not sure what you found to be unreliable. I'm building out commands for mine. I can now walk into a room. Say hey jarvis it's dark in here, and home assistant turns on the lights in the room I am in. And it's completely local. Well except the response back that it turned on the lights in insert room name. The response I'm using Nabu casa.
I can't understand why nabu casa just doesn't sell a ready built hardware product for voice out of the box
I think we will see one...
But they do in a way, right? M5stack is one of two supported out of the box with ready to use firmware