Building a Local Smart Home Voice Assistant With ESPHome!
ฝัง
- เผยแพร่เมื่อ 5 ก.พ. 2025
- Home Assistant has finally added the long awaited wake word feature to their local voice assistant, which is amazing news as it means you can now control your smart home locally with just your voice. Today we go through how to setup Home Assistants voice assistant and how you can build your own with an esp32, a microphone, amplifier and speaker using ESPHome.
Parts:
ESP32: shop.everythin...
Other ESP32s: amzn.to/3rTYUgq
Microphone: amzn.to/3Q2ULyF
Amp: amzn.to/3Qpb5LA
Speaker: amzn.to/3QqZ4oV
ESPHome Code:
gist.github.co...
ESPHome beginners guide:
• This is SO Much Better...
Patreon:
/ everythingsmarthome
Buy Me a Coffee:
www.buymeacoff...
Written Article:
everythingsmar...
EVERYWHERE YOU CAN FIND ME:
Shop:
shop.everythin...
Everything Smart Home Community Discord:
discord.everyt...
Twitter: / everysmarthome (@EverySmartHome)
Instagram: / everythingsmarthome
Facebook: / everythingsmarthomeoff...
#homeassistant #smarthome
________________________
Some of the links above are affiliate links, where I earn a small commission if you click on the link and purchase an item. You are not obligated to do so, but it does help fund these videos in hopes of bringing value to you!
Thanks so much for making this video, Lewis! I would absolutely buy mic add-ons for my EP1's :) Also a small note: you can test wake word detection via the pipeline debug panel now too.
Thanks Mike, totally forgot to mention that and it's useful for testing!
A collab between @HexiBase and@@EverythingSmartHome would be really nice.
@@EverythingSmartHome Couldn't you put this device in a central location of your house (depending on how large it is) and connect multiple speakers and microphones around the house without having to have multiple devices?
Who else is waiting for another product that beats out the big manufacturers with all the features the community wants from Lewis for this? :D
facts
I am very much waiting for it haha
Any requests?
@@qwertyuiop8642 A esp based addon for assist to allow voice control
My Presence Lite arrived today, really impressed with the kit so far, just need to spend some time getting it configured, thanks Lewis!
Also ordered several presence lite. Looking forward to try them out. But yeah why not stick a microphone on the boards on either ep1 or lite. I don’t care about speaker confirmation everywhere. Could just be a led. Just have to fit in the box. 😊
But yeah wonder what it would take to make a device to run wakeword locally and create a nice case for it. 🤔
This is awesome. Can’t wait to spend way too much time on integrating this 😂
Haha story of my life 😂
As usual, great video.
And yes. We absolutely want to see an add-on board with microphone and speaker. Maybe even an additional LED to show if it is listening for wake word.
Would also be nice if the microphone could do double duty and listen for sounds in a more general way. Like any sound. "Trigger, if sound level is above xx dB."
I'd love your Everything Presence One with voice assistant integrated into one device!
Would also be great if it could directly disable the microphone if no presence is detected, rather than go through an automation?
Now that I think about it, that sounds great to me.
I guess I'll try to build one such myself next year. Been wanting to DIY something with ESP for a while now.
great video. I'm really excited about what's to come.
Since I have 7 EP1s in operation myself, I would be happy to receive a kit to be able to use the voice function.
such a kit with microphone and loudspeaker would be cool and maybe a new housing to print yourself 😂
I just built this a few days ago and it is awesome, especially because google home and alexa don't support my language and while i'm fine with English, it is more natural to speak your day by day language when using home automations.
Microphone for EP Lite would be good too, mine just arrived today - thanks Lewis for designing these products!!
I'd really love if you could provide a kit to upgrade existing fp1's as well as an option to buy the whole setup at once. The optional ability to have the mic disabled when no presence would also be great :) Keep up the good work.
Man I have to give this a try! Would love to have the response play back on a speaker already in that room like Sonos or heos. With it either pausing the media playing or lowering the volume in that room so it can hear better.
I think the ways they've come for a private voice Assistant is amazing, even just getting wake words to work fairly decent. I am satisfied with it even being processed by the HA server locally, as the traffic never leaves the internal LAN, and if you pair it with something like the EP1 with automations the bandwidth really becomes negligible
Thank you. I've been (lazily) waiting for a full local tutorial. Much appreciated.
Just waiting for the pipelines to be able to know what area the calling device is in now, then it'll be perfect (eg: say "turn the light off" rather than "the the kitchen light off") There is an open pull request for this so hopefully soon!
13:16 Lewis I love your humility. You could have easily mentioned the fantastic presence sensor that you sell here, but you chose not to :)
Fantastic video as always! Thank you for all you've done for this community!
Thanks for watching 🙏🏻
Lewis...anxiously awaiting YOUR I2S microphone breakout board!!! Great video as always, many thanks!
Yes yes yes, I would love the microphone add on for the EP1. That would be perfect. Also, hoping they add "computer" to the wake word list soon. All us star trek fans will be waiting xD
Computer already exist with porcupine1 addon
@@Krull56 ah good too know
I love my EP1, it is so cool. But I think I am going to wait until the EA1 (Everything Assistant One) to add local Voice Assistant to HA.
homeassistant gets better and better so nice to see the progess
Loved this video! I’m an Arduino project builder and IT person and have HA running in a docker container. Will be getting hold of an ESP32 to give this a go, after watching the ESP Home intro video first! You also have yourself a new subscriber!! Keep up the good work!!
So great seeing all this strung together after the gradual releases this year!
So EP-1 Pro with speaker and mic when? 😉
Okay, Lewis you need to bundle the voice features into your EP1 hardware! Just throw one in each room and 💥BOOM💥 you have all you need for hands free human interaction!
I could see that as the backbone to my HA set up. Great stuff as usual buddy!
Ideally, I'd like the EP2 (hint) to have the built-in microphone with on-device wake word, and the speaker be configurable in the response from Home Assistant so that it can output the voice response from the voice assistant through something like a Sonos speaker associated with the same room where the voice assistant was activated from (the room the EP2 is associated with).
I’d also love to see a Docker/ Unraid video as well. As always, love your videos!
FYI I have connected 40W 4" speaker from FaitalPRO to my echo device and it outputs a crazy amount of volume, more than enough for music listening in 500sqft room. These speakers are very sensitive and perfect for ceiling-mounted smart speakers.
Yes!!!! Microphone accessory for EP1. Maybe speaker too if possible...? New 3D Printed case with speaker at back maybe?
Yes, if your presense sensor also included a mic and (maybe) mini speaker so i could use it for wake word stuff, I'd buy one for every room in my house (slowly, but i'd get there).
I was thinking this exact same thing.
Excellent news! I can live with wakeword detection being done centrally rather than on device, especially since the required bandwidth per device is quite low.
If anything it adds more flexibility since you could dynamically switch the pipeline and associated wakeword depending on who is home or present in a particular room (multi-lingual family / friends and relatives coming to visit / etc.)
Great job HA team!
Brilliant works a treat, cant wait for this voice assist to mature, thanks for the video
Just an FYI: With that inmp441 the data sheet says that in mono applications the L/R pin should be pulled low so that it is assigned to the Left channel to reduce interference.
Another fantastic video! Hope you've got some time off planned....you've been one busy dude!
That would be awesome to have a microphone built into the EP devices. If you do go down that route please add the ability to easily disable the microphone.
I just purchased EP1 and would love the addition of microphone and speaker.
Great video & hope you are not affected by the storms - stay safe and well.
You're going to make me start soldering things again and remember my college days in engineering. I drank a lot of alcohol along the way to forget those days. LOL
Hahaha sorry about that 😂
As if you needed to ask... Yes please for a mic for the EP1!
Personally I'm easy about a speaker, depends how loud/clear it can be in a busy kitchen and what sort of new case it would need.
Perhaps it might be possible to cast response audio to an existing Google speaker, if that's not too laggy...
Edit: Actually perhaps bluetooth would be faster, always forget they do that.
Adding a mic and speaker to the presence detectors would be very cool
5:55 "you should see that all three services now show up" .. yeah, or not :D why am i not surprised? That's HomeAssistant :D
I need HA to brew tea and bring it to me 😄
As someone that is about to pick up a EP lite kit, Would you make a video about adding the microphone into the EP1 and the EPL?
Yes! Microphone add on to EP1 would be awesome! 👍
Yes - microphone on / in the EP1 ! YESY YES, YES! Speaker to ???!!! YES / YES / YES !
Some rtttl buzzer can be attached and trrigered on listen and on end action for listening sound.
this is pretty huge. i stepped away from HA because i was able to accomplish everything in another platform, but being able to self-host a voice assistant is huge. i might just have to load up HA again
hey great video thanks :) yeah Id total buy an add on mic for my EP1 that would be a great way to add voice control without needing something else sitting around.
Yes, I would love a speaker+mic combo for the EP Lite!
Brilliant video thanks. Waiting for a how to guide to set this up on a pi 3b use some of that old Tec up.
great video again, i believe they did just announce that you can build a satellite that runs Wake Word detection directly on it, can you do a video on how to build one? Id really love that.
Thank you, this video is yet another great one like many you do. I have followed it to make my own less the speaker. Almost all look good, device seems to be up and running however, no response and "Assist in progress" is off. any help to debug would be great
Thanks once more Lewis, straightforward step by step guide, as always! Also, +1 for the EP1 mic add-on module! Any idea if USB mic arrays like the Seeed Studio ReSpeaker work with Home Assistant?
I'd like to know this as well. I have a respeaker in a drawer since playing with rhasspy a while back
You need som kind of box for the speaker to make is sound better.
I remember I found a lid that was the perfect size for one of those speakers a few years ago.
Just some hot glue and it will be a major difference
This would fit perfectly in the EP!
Yes please do the microphone for the everything presence one. Thank you
Picard walks into his readyroom and says : " Computer, lights! "
Thank you lots for this example and the Code. I was trying to do it with the instructions for ESP32 from the Chapter 4 Blog post. But it only refers to the code for the M5 and it is missing a wiring diagram. Without any knowledge about I2S i got stuck pretty fast... 🤪
Is it possible to send the speech output to one central good speaker instead of equipping every device with a speaker?
Would also love for this to be possible!
I think there must be a roundabout way of doing that, maybe with automations but haven't tried it yet myself
That would be really useful to be able to send the audio to another wireless speaker, and only build some standalone mics.
Very very cool! This is now my next project, thanks Lewis 😎
Have fun and good luck! 🙌
Thank you for the great video. Would like to buy upgrade kit for all my EP1s. Cool. Please proceed....
It's sweet and really amazing. Nice video :D Thank you
Wow, nice video and tutorial.
I make one with esp32 but in esphome log have a speaker buffer full error...
Recently? What hardware were you using?
@@EverythingSmartHome thank for answer, yes i had build it this evening with esp32 wroom sph0645 microphone and max 98357 amp. It work few times but after that hang with error speacker buffer full and esp reboot and hangs
Same thing here, it manages to get the response out (mostly) but then I get those errors. It also does a great job of detecting the wake word but never understands what I tell it to do, anyone know of a way to have the server just record the raw audio to a wav file so I can tweak the noise and volume settings
Yup, i’m getting buffer full errors every so often as well and the response isn’t clear when that happenes
Anybody found a solution for speaker buffer full?
This is great! I am hoping someone will design a half way decent 3D printed case to put this ESP32/speaker setup in so it can look halfway presentable. Until then I've ordered an M5 to play with.
Great video and very simply explained!
I was able to setup Voice Assistant in HomeAssistant using
1. ESP32 Devkit V1,
2. DFRobot Max98357 and
3. INMP441
It works like a breeze
Two problems I am facing however which I hope you or someone can help me fix :)
1. The speaker keeps giving humming noise till the first command is given, after that it works amazing
2. The ESP32 DevKit keeps crashing every few seconds of running ( memory issue ? )
Any pointers will be helpful!
Thanks again for a great video :)
Thanks Lewis for another great video. I would like to know, how it could be accomplished to implement a sound feedback instead of status LEDs on such a voice assistant. For example I would like to have some Startrek computer sounds to show if the command was understood or not. The "usual switched on" or "switched off" is rather long and in fact really useless. Perhaps this is an idea for an follow up video?
Thanks again for your great work. Cheers Wilhelm
Can we use this without having SSL setup locally, or without Nabu cloud? It doesnt work through the HA app. It would be awesome to see you do a video on how to get local SSL up and running. Love your content!
great explanation Lewis, getting closer to general consumer level, are you going to create a new EP1 Kit with a voice assistant included?
Definitely want a mic accessory for the EP1🤟
Hi Lewis, fantastic and informative video as usual. I have bought the ESP32 chip from the store, wired it up following the video instructions. HA recognises the ESP device and everything seems to be configured OK. It is my first time with ESPHome / electronics and so am a complete newbie. I have set-up the voice pipeline and it works from my laptop browser microphone and speaker. However, the Assist button doesn't come on at all when I speak to the ESP microphone at all. Please can you advise where I should begin trying to resolve and get this exciting project working. Any hints would be gratefully appreciated either from you or the wider community. Thanks in advance for any ideas you could provide.
Finally! Wake words.
P.S. I am waiting for delivery on an EP lite so yes, I would be interested in adding mic and speaker.
Maybe you can do a video on the creative "containers" viewers create for their home. (Like the R6, I'm sure others will come up with fascinating devices.)
Thanks for this but my heart sank when I saw you mention ESPHome. I consider myself competent with technology and have Home Assistant voice control working on my Intel NUC via a cordless phone with Grandstream VOIP and through the Companion app. However, it would be an understatement to say that ESPHome had me pulling my hair out when I tried to set it up with an Atom Echo. I read every available instruction and spent literally days trying to set it up - a total of at least 30 hours. I found Home Assistant/ESPHome's own instructions ambiguous and unhelpful. I had an Echo device that was recognised by the system but wouldn't do anything, then on attempting to reinstall it, a whole raft of different problems ending with a persistent encryption error that, according to ESPHome's documentation, had been fixed a month earlier! I finally gave up and binned the device for the sake of my mental health. Since it means going into ESPHome again and adding custom hardware, I won't try to follow your process but instead wait for further developments in input devices.
Great video as always! I have a couple of esp32 camera board installed and connected to HA, would it be possible to add the mic to this board and use it as a voice assistant in combination with the camera?
Interesting vid, thanks for putting this together.
I have succeeded getting this work on Arduino framework, instead of esp-idf. What's the reason for/upside of using esp-idf?
As always, a great video. I cant get past testing the speaker on my PC (it has a red exclamation mark next to it). (Running HA on RaspPi, accessing HA from firefox or chrome). I'd love a video on how to setup https locally (if this is what is needed to make it work). Subscribed to home assistant cloud and use that for google integration / remote access
A bit late to this but very usefull video. I would also purchase a mic add on for my EP's
What I would love to see is:
* A way to talk to assist programmatically (rest API?)
and get a response back, to do local TTS and/or STT
* A way to "talk" to assist using some existing chat system (IRC, XMPP, mattermost) etc
Or
Can’t wait to try. Thank you for this!
Great video! How did you go about tuning the noise_suppression_level, auto_gain and volume_multiplier? Is it just trial and error? How do you know which one to tweak based on what is being understood by whipser?
Thank you for sharing! Trying to get it to work on the esp muse luxe speaker. But haven't got too far. (Video request ☺️) Also want to run the models on my blue iris machine as it has more power. Currently what works well for me is willow on an espbox :)
HI Lewis... amazing videos, do you have any info on how to get th ESP muse lux for wake words?? I have 2 and cant get it to work... thanks
Great video thank you! The local processing of your voice happens very fast. Where do u have HA installed? On my setup it’s really slow and looking for a nuc, but don’t really know which one I should get…
Just found this video- epic. Can you post a way to find the guy or stl files for the little droid at the end? Its so quickly mentioned i can’t figure it out.
I use tablet and old android phones in my rooms as control panels where anyone can interact with smart home / home assistant. Is it possible to use those devices as microphones for picking up wake words and voice commands?
Hi you can try with tasker app and hotword plugin to open assist companion on your android device
Ok so I’m waiting for a device I can put in every room and just set it up. Getting out my soldering iron? Not since my Nascom. As for the voice synthesis, that was worse than my bbc micro!! Seriously it is progress but a very long way to go.
absolutely add a mic as an accessory for the ep1!!!!!!
I wonder if a raspberry zero 2 w is powerful enough for on device wakeword processing.
This video is beyond epic ❣
This sounds like an amazing feature and I'm sure I'll come up with lots of ways to use it.
Question: Can you configure an existing smart device, such as Amazon Echo or Google Home, to act as the voice command trigger / responder for the new voice assistant function within Home Assistant?
Thank you for the very informative video and the detailed explanation, great job, as always!
A major problem I ran into is while running on proxmox you need to enable certain cpu features. I'm not sure which as I just changed mine to pass all features my physical cpu supports. Otherwise its unbearably slow/inaccurate.
Thank you so much for pointing this out its such a difference
@@robo269 no problem! I think I found the solution in a random GitHub issue. It was unusable for me before. Thank you for commenting back letting me know my message helped someone!
Hi, could you elaborate, what you set in the proxmox settings? I am running HA with Proxmox on a MacMini with I5 and the recongnition is unusably slow. Any help greatly appreciated
@@wilhelmspeck5870 in the hardware settings for the home assistant VM you can edit the CPU and there is an option that likely is set to kvm64 and I changed mine to host. If you have multiple proxmox servers you want to do live migrations between then this might not be a good option for you. If you don't (running it all off that one mac mini) then that should be fine. I'm on Mobile right now and can't get to my proxmox so can't get the exact menu items right now. Let me know if this was enough to help or not.
@@wilhelmspeck5870 what @theslimhim said I set cpu type to host on the hardware page for the vm
yes please on the additions for EP1 and EPlite. :)
Ive watched several videos on home assistant with these kinds of devices connected. I would like to know if you can designate your own TTS, STT, and LLM servers and not rely on the ones in Home assistant.
Ive been training my own LLM AI which is way more advanced than this and it would be nice to use it in place of the defaults.
Hi Lewis, this is great!!! I have already builded this Voice assistant and it is working !!!!!! I do have an additional question. Is possible to set this "ESP voice assistent device" also as a media_player entity? To stream also other tts messages to this device? Thank you. Prem
How do you enable https on a local connection as this appears to be a prerequisite of using speech.
I made the project as per the diagram and the code from the site. I configured the "hey pai" wake word in home assistant. The esp32 board wakes up only sometimes. How do I configure a trigger button instead of wake word.
My Local HA Assist I setup was named Jarvis already... I'm glad thats a wake word!!! LOL...
Tony Stark!
you can just use a cheap esp8266 for this build, no need to go bangers with esp32, it only stream low quality audio over home assistant anyway, maybe we need a esp32 once a on-device wake word becomes a thing, heck I wouldnt be surprised if we need a esp32-c3 this time since we just really need the extra cpu power for the pn-device wake word to become a thing, esp32 is still using mips based processor while c3 is now using the better risc-v.
also tried it with those cheap and tiny esp32-s2 and those work fine as well.
Question: how is device arbitration currently being handled?
For example, I have 2 mics in adjacent rooms, and I loudly scream "OK Nabu!"... is there an algorithm in place which determines the "winning" device?
If the future roadmap might put processing on the mic/speaker device instead of the hub, does it make sense to only treat this current solution as a bit of fun rather than splurging out and setting one up in every room (like I'm itching to do 😂)?
There is a way to use actionable notification? The idea is the some speakers send info and react with an action to the mic. Im currently using the Alexa skills integration .
I have a couple ESP8266 laying around. Thought they'd work. Remapped the GPIO pins and set the proper board type. NOPE. Voice code only works in ESP32 chips (for now?). "Invalid ESP32 Variant". So , FYI
I'm having trouble getting wake word to work. The "use ake word" switch is on in my ESP32 device. I can turn lights on/off with voice command clicking the mic icon in the voice assist section of my dashboard. Nothing happens when I say the alexa wake word. Any ideas?
Same here. I tested the pipeline on my computer and it works fine there, but not on the ESP32. I've tested the micrphone and ESP32 with other projects and confirmed they were fine.
For me it runs for a while, but then stops after first detected wake word. Notice that attached yaml code had wake word set to false. I have lost hope with HA and esphome. It is just too flaky to get anything to work consistently, and the way HA provides debugs is really counter intuitive.
I hope this leads to us being able to have custom voice assistant voices... celebrities/characters etc