#ESPHome 2024.11 on M5stack Atom Echo
1 messages · Page 1 of 1 (latest)
Cc @forest girder
It sounds like several different (possibly related) issues here, so we need some more information. Did the same yaml work fine before the 2024.11 update? Is the reason you can't set the timer because the microphone quality is worse, and the STT isn't working well? How did you setup the timer and wake word ringing exactly?
Sure, the device worked properly and had no issues before the update. In fact, if I install the version from the Ready-Made projects page of ESPHome, it works correctly. However, after installing it and HA prompts me to update the device's version, the issue reappears. I have no problems with the microphone because it works fine. After updating, my issue is with the TTS sound quality—it has a kind of metallic, very low-quality sound. This is my configuration file.
A short video about it. My first language is spanish.
Didn't the default sample rate change in 2024.11? 🤔
I hadn’t used any setup related to sample rate before the 2024.11
Yes, i mean internally in the i2s_audio comppnent. Which means that not touching a config would change the default
If I understand correctly what you said, it might be the case since, as I mentioned earlier, when I install the default configuration from ESPHome Ready-Made Projects, it works fine. However, when linking it to HA and the system prompts me to update, the issue reappears. I'll try to replicate what I’m describing and will attempt to share it.
Default configuration, the speaker sounds very good, but timers don't work. When I set one, it tells me the command was received, but when I ask about the timer's status, it says there are no active timers.
Up to date, speaker gets the bad sound
That's the entire issue
I can reproduce the poor audio quality on an Echo, I'll look into today
I think I'm driving myelf crazier, and I can't tell if I am hallucinating a difference in audio quality as I play around with various settings. Would you mind adding a couple of things to your yaml and let me know if the audio quality is good/bad/different? Let's start with building a firmware with the ESPHome 2024.11 but with ```external_components:
- source: github://pr#7449
components: [i2s_audio]``` added to your yaml.
As a separate test, take out that yaml block and replace it with ```external_components:
- source: github://pr#7459
components: [voice_assistant]```
Sure @forest girder , I'll try it when I get home. Thanks!!
I used this block but it didn't solve it. The strange thing, which I can't explain, is why the default configuration https://esphome.io/projects/index.html also gives me the same problem after updating.
- source: github://pr#5230
components:
- esp_adf
refresh: 0s
- source: github://jesserockz/esphome-components
- source: github://pr#7459
components: [voice_assistant]```
Because audio stack was changed in 2024.11
Yes, I've been seeing that in the update notes. However, what I can't figure out is what I need to change to get the device sound back to normal.
There is probably a bug in the new speaker code, so that's why the default configuration is broken after the update. Did you try adding this external component? ```external_components:
- source: github://pr#7449
components: [i2s_audio]``` That should use the old speaker code. I'm trying to track down where the issue is, and so if adding that to your config makes it sound okay, then I know for sure it is in the new speaker code.
Oh, I'm sorry, I didn't manage to see that you suggested using that code as well. Understood, I'll try it later at home. I appreciate all the support you've given me!
@forest girder Bro, it worked using:
external_components:
- source: github://pr#7449
components: [i2s_audio]
Everything is OK now. Thanks a lot!!
Well, that fixes it because its using the old code. I'll keep trying to track down why my new speaker code is doing this so its fixed for everyone. Thanks for reporting!
This was a super annoying one to figure out! Apparently the Echo speaker wants 32 bits per sample (the datasheet is in Chinese, but it still wasn't clear even with Google's automatic translation - I figured this out by a random test). The reason the old code worked was basically by accident; the sample was duplicated to convert from 1 channel to 2 channels. This effectively made it 32 bits per sample (the least significant 16 bits were non-random noise, as they were really a copy of the original sample itself). The current code still didn't work even when configured at 32 bits per sample because I had it reconfigure the I2S bus to use the incoming audio's bits per sample rather than the originally configured value. I have a pretty simple fix, but I want to add a few other small improvements into the branch before I make a PR. I'll let you know when its ready to test it out though, as it would be great to have someone else verify its working well!
Alright, I made a PR for the low audio quality issue on the Echo. I would appreciate if you could try it out and let me know how it sounds! You need to adjust your speaker configuration to this: ```speaker:
- platform: i2s_audio
id: echo_speaker
i2s_dout_pin: GPIO22
dac_type: external
bits_per_sample: 32bit
channel: rightand addexternal_components: - source: github://pr#7916
components: [i2s_audio]``` to use my new PR (remove any other external components importingi2s_audio).
Don't spoil other's thread. Create your own, paste your config and explain thoroughly what doesn't work and which hardware you use and if you tested speaker separately to make sure that it works.