esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

M5Stack Atom Echo: Microphone with low sensitivity after update to 2024.7.0 #6059

Open lufetico opened 1 month ago

lufetico commented 1 month ago

The problem

A have a M5Stack Atom Echo as a device to control Home Assistant with my voice. Project Voice Assistant (https://esphome.io/projects/)

A while ago I updated the firmware of my M5Stack Atom Echo to the latest version available (2024.7.0) and I thought everything was broken but the problem is that now I have to talk very loud for the device to hear me and wake up. Is there any way to increase the microphone sensitivity? I have to speak practically glued to it or it won't hear me.

I have no technical knowledge of ESPHome. What information can I provide to help resolve the problem?

Which version of ESPHome has the issue?

2024.7.0

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.7.2

What platform are you using?

ESP32

Board

M5Stack Atom Echo

Component causing the issue

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

HaraldGithub commented 1 month ago

Same problem here with the same system configuration.

niklasmoeller commented 1 month ago

Same for me. I have to get very close for it to pick up my wake word. But the voice command actually still works, when i'm further away. Tested it by deactivating wake word and using the button instead. The command worked from a meter distance, wake word didn't.

niklasmoeller commented 1 month ago

Little update for you guys. I talked to Jesse in their discord and he told me it will be fixed again in 2024.7.1. This is the MR that does the trick: https://github.com/esphome/esphome/pull/7109

If you can't wait until then: Just edit the file yourself (if you use docker, you can just open a console inside the docker container and edit the file there inside /esphome/esphome/...), clear the build and reinstall. Works for me now. :)

HaraldGithub commented 1 month ago

@niklasmoeller

Thank you for this information. BTW: Have you also talked to Jesse about this issue: #6061 ?

niklasmoeller commented 1 month ago

No, but there's a workaround in another issue. I'll mention it in 6061.

HaraldGithub commented 1 month ago

Yes, i know. The partial rollback works for me too, but with the next ESP-Update, the problem will occur again.

reflectivecode commented 1 month ago

Using that PR fixed the problem I had with my Atom Echos where voice activity detection wasn't correctly detecting the end of speech.

external_components:
  - source: github://pr#7109
    components:
      - i2s_audio
ucdailoi commented 1 month ago

Thanks for the fix in 2024.7.1

The issue I'm now seeing is a very loooonnnngggg wait when it's receiving the response, and this its spat out in the logs of the M5Stack.

54 seconds of waiting then "Cannot receive audio, buffer is full"

[20:16:00][D][voice_assistant:504]: State changed from STOPPING_MICROPHONE to AWAITING_RESPONSE [20:16:54][D][voice_assistant:627]: Event Type: 4 [20:16:54][D][voice_assistant:655]: Speech recognised as: "Turn off the palm light." [20:16:54][D][voice_assistant:627]: Event Type: 5 [20:16:54][D][voice_assistant:660]: Intent started [20:16:54][D][voice_assistant:627]: Event Type: 6 [20:16:54][D][voice_assistant:627]: Event Type: 7

[20:16:54][D][light:036]: 'M5Stack Atom Echo 0ae870' Setting: [20:16:54][D][light:051]: Brightness: 100% [20:16:54][D][light:059]: Red: 0%, Green: 0%, Blue: 100%

[20:16:54][D][voice_assistant:627]: Event Type: 98 [20:16:54][D][voice_assistant:770]: TTS stream start [20:16:54][D][esp-idf:000][speaker_task]: I (361606) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=8 [20:16:54] [20:16:54][D][i2s_audio.speaker:206]: Started I2S Audio Speaker [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][E][voice_assistant:806]: Cannot receive audio, buffer is full [20:16:54][D][voice_assistant:627]: Event Type: 99 [20:16:54][D][voice_assistant:778]: TTS stream end [20:16:54][D][voice_assistant:375]: End of audio stream received [20:16:54][D][voice_assistant:504]: State changed from STREAMING_RESPONSE to RESPONSE_FINISHED [20:16:54][D][voice_assistant:510]: Desired state set to RESPONSE_FINISHED [20:16:55][D][i2s_audio.speaker:210]: Stopping I2S Audio Speaker [20:16:55][D][i2s_audio.speaker:222]: Stopped I2S Audio Speaker

reflectivecode commented 1 month ago

The long response time could just be how long your text-to-speech pipeline takes. Are you running Piper locally? I switched to "Google Translate text-to-speech" because Piper was unbearably slow on my hardware.

As for the "Cannot receive audio, buffer is full" error, I occasionally see that error accompanied by garbled audio output. Somewhere I saw someone recommend using a higher-quality/higher-power USB power adapter to fix that problem. I tried that myself and had better results, but I can't confirm that the power adapter was the only change that contributed to the improvement.

asherw commented 1 month ago

(sorry that was me posting as ucdailoi when I was visiting) The full pipeline completed successfully but it was having trouble getting the response audio and playing it.

I've moved to using Micro Wake Word and that is working a lot smoother. Will tell if its stable over the next few days.

MWW example here: https://github.com/esphome/firmware/pull/242

lufetico commented 1 month ago

Little update for you guys. I talked to Jesse in their discord and he told me it will be fixed again in 2024.7.1. This is the MR that does the trick: esphome/esphome#7109

I do not have the knowledge to make this change manually. Is it possible to downgrade the firmware?

lufetico commented 1 month ago

I upgraded to the new firmware yesterday and the problem seems to have been fixed. Thank you very much!

qmiloo commented 3 weeks ago

Hey, unfortunately with 2024.7.3 have still issue with low sensitivity. Have to almost put it to my mouth to get this work ;(. It's only me or anyone have same issue?

fredebec commented 3 weeks ago

I have also the same issue with 2024.7.3 : low sensitivity with the wake word, but voice command is OK.