Lurker News
As the Home Assistant project says, it's the year of voice!

I love Home Assistant and I've always thought the ESP BOX[0] hardware is cool. I finally got around to starting a project to use the ESP BOX hardware with Home Assistant and other platforms. Why?
- It's actually "Alexa/Echo competitive". Wake word detection, voice activity detection, echo cancellation, automatic gain control, and high quality audio for $50 means with Willow and the support of Home Assistant there are no compromises on looks, quality, accuracy, speed, and cost.
- It's cheap. With a touch LCD display, dual microphones, speaker, enclosure, buttons, etc it can be bought today for $50 all-in.
- It's ready to go. Take it out of the box, flash with Willow, put it somewhere.
- It's not creepy. Voice is either sent to a self-hosted inference server or commands are recognized locally on the ESP BOX.
- It doesn't hassle or try to sell you. If I hear "Did you know?" one more time from Alexa I think I'm going to lose it.
- It's open source.
- It's capable. This is the first "release" of Willow and I don't think we've even begun scratching the surface of what the hardware and software components are capable of.
- It can integrate with anything. Simple on the wire format - speech output text is sent via HTTP POST to whatever URI you configure. Send it anywhere, and do anything!
- It still does cool maker stuff. With 16 GPIOs exposed on the back of the enclosure there are all kinds of interesting possibilities.
This is the first (and VERY early) release but we're really interested to hear what HN thinks!
[0] - https://github.com/espressif/esp-box

Comments (138) 39 threads

Earlier comments
Vinnl1 reply#
It looks great, but also like it might need to mature a bit before it's usable for less advanced users like myself. Do you have an RSS feed or newsletter I can subscribe to so I'm reminded some time from now to check it out again?
kkielhofner#
Thanks!

You're spot on - we're happy for anyone to test and use Willow but the intended users at this moment are early adopters that can build and flash as development is moving very, very quickly.
Unfortunately we do not, maybe try "watching" the repo on github?

dingledork691 reply#
Cool! What software is used for the wake word detection, speech to text and text to speech?
kkielhofner1 reply#
For wake word and voice activity detection, audio processing, etc we use the ESP SR (speech recognition) framework from Espressif[0].

For speech to text there are two options and more to come:
1) Completely on device command recognition using the ESP SR Multinet 6 model. Willow will (currently) pull your light and switch entities from Home Assistant and generate the grammar and command definition required by Multinet. We want to develop a Willow Home Assistant component that will provide tighter Willow integration with HA and allow users to do this point and click with dynamic updates for new/changed entities, different kinds of entities, etc all in the HA dashboard/config.
The only "issue" with Multinet is that it only supports 400 defined commands. You're not going to get something like "What's the weather like in $CITY?" out of it.
For that we have:
2-?) Our own highly optimized inference server using Whisper, LLamA/Vicuna, and Speecht5 from transformers (more to come soon). We're open sourcing it next week. Willow streams audio after wake in realtime, gets the STT output, and sends it wherever you want. With the Willow Home Assistant component (doesn't exist yet) it will sit in between our inference server implementation doing STT/TTS or any other STT/TTS implementation supported by Home Assistant and handle all of this for you.
[0] - https://github.com/espressif/esp-sr

dingledork69#
Thanks so much for doing this, that sounds very exciting and I can't wait to try it out!
tikkun1 reply#
What are the biggest challenges that you see for improving it even further?

Looks really promising!

kkielhofner4 replies#
Thanks!

If I'm being perfectly honest I'm surprised we got it this far already. If I wanted to be really critical:
- Far-field speech is actually kind of hard. There are at least dozens of "knobs" we can tweak between the various component libraries, etc to improve speech quality and reliability for more users in more environments. We've tested as much as we can considering there's only two of us but we need more testing from more speakers in more environments.
- On the wire/protocol stuff. We're doing pretty rudimentary "open new connection, stream voice, POST somewhere". This adds extra latency and CPU usage because of repeated TLS handshakes, etc. We have plans to use Websockets and what-not to cut down on this.
- We don't really support audio playback yet. For a real "Amazon Echo" type experience you need to be able to ask it random things like "Hey what's the weather outside?" and it needs to "tell" you.
- Ecosystem support. Using the example above, something like Home Assistant or similar needs to know where you are, get the weather, do text to speech, etc for Willow to be able to play it back.
- Other integrations. Alexa has "skills" and stuff and we need to be able to talk to more things.
- UI/UX work. We support the touch display but we did just enough to show colors, print status, add a button, and make a touch cursor that follows your finger around. We also only give audio feedback with a kind-of annoying tone that beeps once for success and twice for failure.
- Speaking of failure, we don't do a great job of telling you what went wrong and where.
- Configuration and flashing. It's very static and has multiple steps. There are all kinds of things that need to get done to make Willow easy enough for less-technical users to deploy and actually use daily without any hassle.
- Local command recognition. It's very early but as noted in the README, wiki, etc the ESP BOX itself can recognize up to 400 commands directly on the device. In testing it works surprisingly well but we have a lot of work to do to make it actually practical for most people.
- Open sourcing our inference server. We plan to do this next week!

tikkun1 reply#
Nice! How's the speech recognition accuracy and response latency?
kkielhofner2 replies#
Thanks!

Faster than Alexa (and only going to get faster)[0].
Between the far-field speech optimizations provided by the ESP BOX and Espressif frameworks and our inference server (open sourcing next week) using Whisper, and our unique streaming format we've found it to be comparable in terms of quality to Alexa/Echo even with background noise and at distances of up to 30 feet.
[0] - https://www.youtube.com/watch?v=8ETQaLfoImc

Continue this thread — 2 replies

michaelmior1 reply#
> the ESP BOX itself can recognize up to 400 commands directly on the device.

That's really cool! Does this mean 400 specific commands, e.g. "turn on the living room lights" or 400 commands that can be applied to different targets, e.g. "turn on the X lights" where X is some light. (400 actually feels like it would be enough to speed up the vast majority of interactions either way, but I'm curious :)

kkielhofner#
400 commands where "turn on X" is one and "turn off X" is two.

With Home Assistant this means turning on and off two hundred entities. We currently pull light and switch entities from Home Assistant and build the local Multinet speech grammar.
We have goals for better dynamic and adaptive configuration of Willow and part of that is using a Willow Home Assistant component with user configuration inthe HA dashboard, etc to easily select entities, define commands, etc and dynamically update all associated Willow devices.
We feel that with this 400 commands is enough to be practical and useful. Additionally, because the Multinet model returns probability on match to command "fuzzy matching" actually works quite well where "light", "lights", and slightly mis-worded commands still match correctly.

michaelmior1 reply#
> Open sourcing our inference server

I'm curious if this is something lightweight enough that might be possible to run as a Home Assistant add-on on relatively low-powered hardware such as an RPi.

kkielhofner#
I talk about this a bit on the wiki[0] but our goal is to have a Willow Home Assistant component do the Willow specific stuff and enable users to use any of the STT/TTS modules provided by Home Assistant.

We'll also (likely) be creating our own TTS/STT HA component for our inference server that does some special/unique things to support Willow.
[0] - https://github.com/toverainc/willow/wiki/Home-Assistant

haarts1 reply#
With regard to this:

> - On the wire/protocol stuff. We're doing pretty rudimentary "open new connection, stream voice, POST somewhere". This adds extra latency and CPU usage because of repeated TLS handshakes, etc. We have plans to use Websockets and what-not to cut down on this.
I've recently used the Noise protocol[1] to do some encrypted communication between two services I control but separated by the internet.
It was surprisingly easy!
[1]: https://noiseprotocol.org/

kkielhofner#
Thanks for mentioning noise! I've certainly looked at it before but our challenge is the sheer scope of what we're doing. Not to mention (similar to WebRTC that people have asked about) I'm not completely understanding the fit and benefit for our use case and application.

I talk about websockets because they achieve our mission and goal (in this case shaving milliseconds off command -> action -> confirmation) with robust, battle-tested client implementations already available in the ESP framework libraries. Same thing for MQTT. Both are supported by Home Assistant (and almost everything else in the space) today.
Because of this existing framework support, we'll have websockets done today-ish. Then we can (for now) move on to all of the other things people have asked for :). Hah, priorities!
Not saying Noise won't/can't ever happen - just that this is a very ambitious project as it stands and we have plenty of work to do all over the place :)!
Want to write a noise implementation for ESP IDF :)?

_joel1 reply#
Is there an analogous thing for RPi? I've got some old ones and a USB mic array from seeed etc that I've still not put to use. Also got an ESP32 (vanilla with a small oled) if I can use that?
kkielhofner1 reply#
The Home Assistant project (as part of the "year of voice") is working on wake word, etc for Raspberry Pi from what I understand. However, as someone who's tried to do exactly this on a Raspberry Pi before supporting wake word and getting clean audio from 25 feet away with background noise, acoustic echo, etc with a random collection of software and hardware is very challenging. I have an entire graveyard of mic arrays from seeed and others myself :).

Espressif really did us all a solid with this hardware and their ADF and SR frameworks.
Whether it's cost, being fully assembled and ready to go, and even wake word, AEC, AGC, BSS, NS, etc at least as of now the ESP BOX is essentially impossible to compete with in terms of hardware in the open ecosystem.
I talk about this and more on our wiki pages[0] (check out "Hardware" and "Home Assistant"). In short, the Espressif frameworks we use /technically/ support the "regular" ESP32 but it's so limited (and the ESP BOX/ESP S3 is so cheap) we're not super interested in supporting it.
We're aiming for an end-user experience that's competitive with Echo, Google Home, etc in every possible way - speed, quality, reliability, functionality, and cost.
In fact, we want to crush them on all points to where there's no reason left to buy one of them.
[0] - https://github.com/toverainc/willow/wiki/

_joel#
Thanks, yes that's perfectly reasonable. Cheers for the reply.

Load more comments