Could we get an example of how to connect the Luxe’s microphone in ESPHome? The latest ESPHome and beta version of Home Assistant support creating voice assistants!
No wake words at this point but we could repurpose the play button as a Push to Talk activator. I’d love to experiment with the luxe on my sofa end table! Imagined the Luxe as a totally local smart home Voice Assistant!
Check this code that we are using in the function factory_test( of this code for the Luxe Speaker. It records with the microphone samples played on the left speakers left then the right speaker, then check if the frequency recorded is the same that the one expected. This way we can check that we have no distortion issue on the microphone nor speakers.
The difficulty is that you need to send the I2C commands for the codec on the LUXE, not sure how to do this in a yalm file
Another simpler approach could be to use the Muse Proto board that uses a simple I2S microphone (with also an incredibly good quality) thus no I2C command to send, so maybe it will be an easier start.
This should be all you need on the esphome side of things, however the actual voice part of Home Assistant doesn’t launch until 2023.05 so you’ll have to wait a few days to actually play with it, or use the beta versions.
i’m trying to use my muse luxe as a local vocal assistant with HA beta
on my 2x muse luxe the provided code don’t work as expected
when i press the play button, i can see in logs that the event is fired but i also get a terrible noisy loud sound that came from the speakers until i release the button, do you have a hint about that ?
Thanks in advance
[22:15:16][D][binary_sensor:036]: ‘muse-cuisine Play Button’: Sending state ON
[22:15:16][D][voice_assistant:065]: Requesting start…
[22:15:16][D][voice_assistant:045]: Starting…
EDIT = it is this exact sound :
but i get it only when i press the play button and continue to play until i release.
To record anything on the MUSE LUXE’s microphone the codec (ES8388) needs to receive first an I2C command to enable the microphone. Not sure is the awful noise is related to this but we are going to try the PROTO so use a simple I2S microphone and post result here very soon.
I’m playing with the PROTO now and feel like I’m getting close(ish) can you confirm which pin is the i2s_din_pin: for the PROTO? Looks like it’s GPIO35 on the Luxe (according to DelusoinalAI’s comment above) but would like to know if it’s the same on the PROTO. Thanks.
thank you!, it sort of works for me too besides whisper getting it wrong most of the time (“whats the temperature” becomes “let us me temperature”) i have managed to tell it to turn off livingroom lights and it actually did, but no audio response, no idea why not because the response url is there, so it works… partly
btw: tried to change whisper model to “base” but it still gets 90% of my sentenses wrong
Yeah, Only cloud sorta works for me. I also have the atom echo and the luxe works a bit better than that… I think this level is expected at this point…
I guess these microphones are too crappy for Whisper to understand them correctly? Does anyone have a recorded snippet from the Muse Luxe so I get an idea what the quality is like? Considering buying one, but that only makes sense if the mic is reasonably good.
Nice! maybe for the quality it could be improved by changing the gain, there are many parameters to try on this codec.
We could help to find the right I2C commands to send but does anybody knows how I could send custom I2C commands? Could it be done simply in the YALM file?
There is also a jack ADC stereo input (line level) on the back of the LUXE that could be used to plug an external amplified microphone, but let’s try first to see what we could with the built-in microphone.
i do have a muse luxe and 3 muse protos, and got voice assistant working on both muse and esp32, though the results are a little different… i asked “whats the temperature in the kitchen”, the image to the left is Muse Luxe, and image to the right is ESP32, i do however have gain on the I2S microphone on esp32 so possible results with muse would be better with some gain. but overall this is still in baby stage, HA/VA often doesn’t know what i want, like in the example… google would have figured that out… kitchen… temperature… how hard can it be, but for HA/VA, very hard :-p