good, thats also where i am, we can’t do anything about HA not speaking the text back, the muse have done it’s part. i got the same to work on both muse and esp board, but not on proto. could you try to get that working?
I’ve added the Muse Luxe in HA using ESPHome with no problems and with a couple of extra features. Here’s how
Feedback is welcome.
Another Yalm for the Luxe that has been reported to work, I haven’t tested it yet:
are you saying that this works with audio response?, i don’t see much different from what we already got working? i was also under the understanding that its a bug, sometimes return .mp3, sometimes .raw, and needs to be .wav? (read from some of the bug reports). or are you using nabu casa cloud?
we got the whole pipeline working, but the end result is not spoken back
I am using Nabu Casa cloud. Is that different? What does the speaker support?
yes we’re trying to make it work cloudless and your example does not work any better than we already got, except yours is full of unneeded code and for some reason you disabled the middle button?, i copied your code and wondered why that button didn’t work
Assist is a pipeline. It’s irrelevant if I use cloud or Piper for STT. Maybe the format in which the generated voice comes back to the speaker is different, but in that case, that would be easier to fix outside the speaker.
And what do you mean i disabled the middle button? Disabling an entity in HA is not the same as disabling a physical button connected to a GPIO pin in ESPHome. Must be more of that unneeded code, I guess
this is in your code and makes middle button not working:
name: Middle button
disabled_by_default: true
entity_category: diagnostic
and no it’s not the same, seems that people who use cloud gets a .wav result if you check assistant debug, without cloud it’s sometimes .mp3 and sometimes .raw and can’t be played.
https://github.com/home-assistant/core/issues/92969
I can’t film the speaker working atm, as i am not neas it. As I said before, disabled_by_default
disables an entity in HA, not the hardware’s functionality Binary Sensor Component — ESPHome
Please refrain from accusing code you do not understand.
Hey everyone, trying to make the Muse Proto work, also getting the same error as @Deco …
Any idea how I could get the actual audio output from ESPHome to debug what comes out there ?
Already thinking about wiresharking it haha but if anyone has easier ideas please let me know…
Greetings
For the Proto we are working on it with some people form HA, I suspect for now that the sampling frequency set in ESPhome by default to 16kHz and maybe not accepted by our I2S microphone, we usually using it at 44.1kHz 24bits when ESPhome runs in 16bits. So we are looking at a way to change this.
declaring the microphone as is it isdone here could also be worth to try :
I’m on another project these next days, but someone from the team will work on it on Monday.
Thanks for the update, seems like this has only been added 1 week ago in:
I have added the config and added the dev version like so:
external_components:
- source:
type: git
url: https://github.com/esphome/esphome
ref: dev
components: [adc, i2s_audio]
But it still does not work…
When I look into homeassistant on the assistant debug part I see this as metadata:
metadata:
language: en-AU
format: wav
codec: pcm
bit_rate: 16
sample_rate: 16000
channel: 1
seems like this has only been added 1 week ago in
You do need that PR, but it should work if you add it. See my config for the Muse Luxe above.
Any idea how I could get the actual audio output from ESPHome to debug what comes out there ?
See these docs on how you could capture and stream the audio data. You can microphone.capture
, then on_data:
send that data to a small HTTP server that can collect and save it for debugging purposes.
It seems that the Muse and I2S microphone will be added in the next release : feat(muse luxe): add voice assistant by bemble · Pull Request #37 · esphome/media-players · GitHub
this is in the new update for esphome, not tried but sounds interesting
https://github.com/esphome/esphome/pull/4743
I can confirm that this does appear to work. it seems that I can’t change the playback volume but this does play the response tts. Here’s the yaml I’m using for my muse luxe, it could probably use a bit of cleaning up and a few more features but it works
substitutions:
name: "raspiaudio-muse-luxe"
friendly_name: "RaspiAudio Muse Luxe"
esphome:
name: "${name}"
name_add_mac_suffix: true
project:
name: raspiaudio.muse-luxe
version: "2.0"
esp32:
board: esp-wrover-kit
framework:
type: arduino
logger:
level: DEBUG
api:
encryption:
key: U+3hBt3JMESTTn8OceUvwx/yPxWcUmQXRl8Iela5j7A=
ota:
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
external_components:
- source:
type: git
url: https://github.com/esphome/esphome
ref: dev
components: [adc, i2s_audio, microphone, media_player, speaker]
refresh: 0s
- source: github://pr#3552
components: [es8388]
refresh: 0s
i2c:
sda: GPIO18
scl: GPIO23
captive_portal:
improv_serial:
i2s_audio:
- i2s_lrclk_pin: GPIO25
i2s_bclk_pin: GPIO5
media_player:
- platform: i2s_audio
name: ${friendly_name}
dac_type: external
i2s_dout_pin: GPIO26
mode: stereo
mute_pin:
number: GPIO21
inverted: true
speaker:
- platform: i2s_audio
id: luxe_speaker
dac_type: external
i2s_dout_pin: GPIO26
mode: stereo
es8388:
sensor:
- platform: adc
pin: GPIO33
name: ${name} Battery
icon: "mdi:battery-outline"
device_class: voltage
state_class: measurement
unit_of_measurement: V
update_interval: 15s
accuracy_decimals: 3
attenuation: 11db
raw: true
filters:
- multiply: 0.00173913 # 2300 -> 4, for attenuation 11db, based on Olivier's code
- exponential_moving_average:
alpha: 0.2
send_every: 2
- delta: 0.002
light:
- platform: fastled_clockless
name: ${friendly_name}
pin: GPIO22
chipset: SK6812
num_leds: 1
rgb_order: grb
microphone:
- platform: i2s_audio
adc_type: external
id: luxe_microphone
pdm: false
i2s_din_pin: GPIO35
voice_assistant:
microphone: luxe_microphone
speaker: luxe_speaker
binary_sensor:
- platform: gpio
pin:
number: GPIO19
inverted: true
mode:
input: true
pullup: true
name: ${friendly_name} Volume Up
on_click:
- media_player.volume_up:
- platform: gpio
pin:
number: GPIO32
inverted: true
mode:
input: true
pullup: true
name: ${friendly_name} Volume Down
on_click:
- media_player.volume_down:
- platform: gpio
pin:
number: GPIO12
inverted: true
mode:
input: true
pullup: true
name: ${friendly_name} Play Button
on_press:
- voice_assistant.start:
on_release:
- voice_assistant.stop:
how did you get around the “Platform not found: ‘speaker.i2s_audio’” ?
The speaker
component in ESPHome seems to have some buffering issues, but it does work with Piper. @jesserockz (maintainer of ESPHome) said he would look into this next week.
I’ve reported the issue, but it looks like we’re stuck with media_player
for now, which doesn’t play raw audio.
If your ESPHome is up to date and you’re not pulling in external_components
that overwrite the speaker
or i2s_audio
components, just hard refresh the browser and it should work.
thanks that did it, i just copied the text from Zortan and it kept giving me red text
on my esp32 it didn’t work because i had two different pin sets for i2s (mic and speaker) which the speaker compnent doesn’t seem to support. besides the buffering issue it has, volume also still seems to be uncontrollable. not perfect but a step forward to finally hear a voice talking back