Muse Luxe voice assistant now possible?

for the lazy here is the final working yaml for Muse Luxe with unneded stuff removed:
working config for Muse Luxe with new speaker component

link updated with edited code so LED turns off AFTER speaking. thanks to Tetele for the “NOT” syntax.

this can be copy pasted directly and will work, of course with the personal stuff above captive portal edited to your own. (API key, name ect.)

1 Like

I don’t see the ES8388 component which I believe is needed in order to set up the audio codec for the Muse Luxe. Also thanks tetele and Deco, I hadn’t realized that all of these changes had been merged into the release version yet but it looks like they have been

no it’s not needed, give it a go :slight_smile:

Your understanding of “unneeded” seems to be very particular to what you think you need :slight_smile:

Why do you have both a speaker and a media_player? Why do you stop the media player on_end if you’ve never started it? Why have you included your native API key?

Speaking of unneeded, why do you even bother with the LED if all you want is to send audio back and forth? What exactly is needed and by whom?

Oh, and regarding this…

Why don’t you give it a go? That PR and external_component initializes the DAC. Yes, taking out the component from the config and reinstalling the ESPHome image does work until the first power cycle because the DAC is kept under power and doesn’t need to be initialized again. However, the first time you turn the speaker off and on again, say goodbye to your home assistant :slight_smile:

Like I said before, please pay a bit more attention to what you do and don’t understand from the configs exposed here by you or others. You will only create frustration in people trying out your config if they find out it doesn’t work.

yes i was going to say the led stuff is unneeded but left if there for those that find it cool, waiting for mediaplayer isn’t needed and should be “speaker.is_playing” but since there is no idle condition on speaker component i left it as it was until that part can be corrected. (until more conditions are added to speaker). - this only means the led will turn off right when it replies and not AFTER it’s done speaking.

i’m not sure what your problem is with my posts, you seem to have a grudge against everything i post, and sorry i don not experience what you say, works just fine without, also after switching the power off/on.

condition:
  not:
    speaker.is_playing:

The media_player is not needed at all if you have the speaker component tied to the voice_assistant.

You said that some most of the config I proposed (check out the older versions) was unneeded, the major differences to what you’ve posted being:

  1. the fact that I’ve included a visual indicator of the speaker connecting to WiFi (LED blinking slowly in amber until connected, then a short burst of green flashes when it’s connected). I think that that’s also a “cool” feature. Not needed, just useful
  2. an external service for starting the voice_assistant from another device (from HA). Very useful, if you ask me
  3. the fact that I’ve disabled the button entity in HA (disabled_by_default: true), since there’s a “duplicate” indicator (“Assist in progress”, coming straight from the voice_assistant component). You said that disables the button, which it absolutely does not

There are a lot of people searching for info on getting their Luxes working as HA Assist satellites. This thread is one of the top results for such searches. Having wasted a lot of time in the past after being confronted with keyboard warriors who don’t know what they’re talking about (I’m not saying you are one, I’m just saying that’s what I’ve dealt with), I believe wrong posts should be corrected (by their original poster or by others) in high-traffic information sources in order to be helpful.

I don’t have a problem with your posts. I have a problem with the wrong information within them.

i see that is is infact a grudge because i said you had unneeded code in your example, thats ok keep having a bad day, all code i post is tested and runs without errors, which is more than i can say for most of the other examples.

i did not know i could do a NOT condition, thanks that solves that minor problem.

@Deco and @tetele please take this conversation off this post and into DMs. we don’t need this back and forth cluttering up the conversation for people looking for how to set up either their Muse Luxe or Muse Proto as a Home Assistant Voice Assistant

3 Likes

I have yet to try it but for those that would rather not deal with configuring yaml and building code it looks like a basic version of voice assistant support has been added to the Muse Luxe here

I haven’t had time to test it but looking at the config for the Muse Luxe the tts responses from piper will most likely not work but everything else should

Why do you say piper is unlikely to work?

The reason I’m asking is that – well – it isn’t working for me on my Muse Luxe. I’m getting a media_url sent over (sometimes raw and sometimes mp3) but nothing plays other than a “pop.”

please try ESPHome Media Players it has been updated today, it should work out of the box with ESPHOME 2023.5.3

Hi wixoff. It’s my understanding that in order for pipers tts responses to work there has to be a speaker element configured for the voice assistant something like the following

speaker:
  - platform: i2s_audio
    id: luxe_speaker
    dac_type: external
    i2s_dout_pin: GPIO26
    mode: stereo
microphone:
  - platform: i2s_audio
    adc_type: external
    id: luxe_microphone
    pdm: false
    i2s_din_pin: GPIO35
voice_assistant:
  microphone: luxe_microphone
  speaker: luxe_speaker

looking over the yaml for the muse luxe in the esphome media players github I did not see a speaker configured. there are a few other things that would have to be changed about the yaml as I didn’t have any luck getting it working with the

on_tts_end:
    - media_player.play_media: !lambda return x;

option under voice assistant but maybe there was something else preventing it from working in my yaml at the time so I can’t say for sure without testing it

Thanks. That might be the problem, but it’s a bit confusing: the voice_assistant component calls for a speaker (but it’s optional), but if you have an on_tts_end automation that uses a media_player, that should work too. But it doesn’t seem to.

Everything else is working - push-to-talk on the middle button picks up my voice, and in the debug log I can see how it’s interpreted; in Home Assistant it will perform whatever action shows up in the text. And then I get a URL for the tts but nothing plays.

When I have some time I’ll fool around with it some more. My problem might have something to do with what I’m doing to mute the speaker when not playing (to avoid the terror-inducing full-volume static bursts that this device does when it is starting up or drops WiFi). @Raspiaudio I’m using a variation on that Muse Luxe-specific yaml from the installer, but I can’t realistically keep this device running without dealing with that noise burst issue.

voice assistant without cloud works and been working a while for the Muse Luxe, and TeTele was right about the need for resetting the DAC, anyway it looks like there’s added support for the mic in Muse Proto so thats only a matter of time before that works too. the audio returned “can” be a little laggy but most of the time it’s fine in the tests i did with the Luxe, piper and google have great conversations now :smile:

here is the code that works for me on the Luxe (including the component i though wasn’t needed, thanks TeTele. and including the original part for the LEDS from github mediaplayers) working code for Luxe

this might be the fix that makes it work on the Proto too:

edit: tried the official code on https://github.com/esphome/media-players/blob/main/raspiaudio-muse-proto.yaml and can confirm it now works! :partying_face:

Please try this config, which mutes the DAC and fixes the pops on various events, specifically these lines which unmute it only when needed. That config has been working better than most others I’ve seen ever since the day I first posted it, and the limitations are listed in the README.

The reason that config does not use a speaker component is listed above - the component has buffering issues on the Muse Luxe. Until that issue is fixed (along with volume control), the media_player is a good enough alternative.

The reason RAW audio does not get played from Piper TTS is that the response seems malformed.

LOVELY! I can confirm this as well, works nicely now on the muse proto :heart_eyes:

But the config still seems strange to me, I think the issue is that the native speaker component is still missing the mute_pin setting. It seems to be there in python but not used anywhere else…

For now I made it work using the trick from the other config:

  on_tts_end:
    - media_player.play_media: !lambda return x;

This does the job for now… but I could not make the speaker:thing work… any tipps ? or is my theory correct ?

Hey everyone.
I received my Muse Luxe yesterday and flashed it this morning via ESPHome Media Players
I have HA 2023.5.4 installed.
I see it connected and most of the features are working.
But there is a “pop” sometimes… shouldn’t this be fixed already?

But now for the real reason I am writing:
I really don’t get the Voice Assistant working.
If i press the middle Button (should I hold that button while speaking?!), the Blue Light comes on.
Now I say something like “Turn off Livingroom Lights”.
Then the Blue Light starts to Blink and then suddenly it does nothing anymore (most of the times the blue light will go off, but not all the times). In the HA Device Overview of the Luxe Muse I could see sometimes that the LED maybe was red for a bright second.
In Home Assistant Voice Assistant Debug i can see this:


Looks like Whisper isn’t working?
Any ideas?

UPDATE:
After re-installing Whisper, my voice gets generated to text.
But there is still no voice response