Thanks to Smart Home Junkie's video (invidious link), I had my Atom Echos as voice recognition boxes with all audio output redirected to a media player of my choice (because the audio on the Echo is super quiet).
Whenever ESPHome updated, I updated my Echos to get the recent ESPHome updates, and then reinstalled the custom yaml for audio redirection.
However, with ESPHome's recent 2024.6.4 update, trying to install the yaml triggers errors that don't seem to make sense. For example, here's a section of the yaml:
On lines 3 and 10 I define unique IDs for the device's microphone and speaker.
But ESPHome won't compile, telling me:
on line 46: Too many candidates found for 'id' type 'speaker::Speaker' Some are 'echo_speaker', 'echo_speaker_kitchen'.
on line 57: Too many candidates found for 'id' type 'speaker::Speaker' Some are 'echo_speaker', 'echo_speaker_kitchen'.
on line 77: Too many candidates found for 'id' type 'microphone::Microphone' Some are 'echo_microphone', 'echo_microphone_kitchen'.
on line 90: Too many candidates found for 'id' type 'speaker::Speaker' Some are 'echo_speaker', 'echo_speaker_kitchen'.
There are no other occurrences of the word "speaker" or "microphone" in the conf yaml (and I'm not including other yaml files).
I'm assuming most of this config is default, and the only things I care about are forcing pin 21 for the speaker (line 11) and redirecting audio to my media player (lines 45-52).
I'm not in a place to actually help as I'm on vacation: but since it's a compile issue, if you posted a minimally failing-to-compilr version (no credentials) of your full YAML someone could conceivably be able to troubleshoot it
on_tts_end: you have a media player component while you define a speaker instead. They are not interchangeable. It is likely trying to grab default values from somewhere because of that. Media player is better if you want the device to also play music or alerts through home assistant instead of voice assistant or some preset wav files.
Media player is also a speaker using an arduino library (not compatible with esp_adf as that uses the esp-idf framework and not arduino). If you want to use the media player, you have to get rid of vad_threshold and the esp_adf.
This did compile and the audio output from the echo is played on the media_player, but the audio is also played on the Echo itself. Previously, changing the i2s_dout_pin from GPIO22 to GPIO21 prevented the Echo from playing the audio (I think by directing audio data to pin 21, which is not used).
I'm not sure what you meant here:
Media player is also a speaker using an arduino library (not compatible with esp_adf as that uses the esp-idf framework and not arduino). If you want to use the media player, you have to get rid of vad_threshold and the esp_adf.
I tried removing "vad_threshold: 3" and the "esp_adf" component:
Sorry, I misunderstood what you are trying to do here. I thought you were trying to use the Atom Echo itself as a media player. Disregard that arduino library comment, it isn't relevant. I just watched the video since I couldn't earlier.
Indeed what you are doing should work. Are you certain that the upload was successful? With GPIO21 set as the speaker output, the speaker data should absolutely not work. The fact that it does means that somewhere along the line, the GPIO22 is set as the speaker output.