Open stu247 opened 9 months ago
I am still having the same issue with esphome-2023.12.8, HA 2024.1.1 and the latest official YAML. See https://github.com/stu247/voice-assistant
I just tried using esphome-2023.12.8 to have the sounds play without commenting out ble in the official yaml file and they did play. In a older version of esphome, the sounds would not play with ble turned on. So that's cool. However, the wake word detection sound still plays at the wrong time.
I just tried using esphome-2023.12.8 to have the sounds play without commenting out ble in the official yaml file and they did play. In a older version of esphome, the sounds would not play with ble turned on. So that's cool. However, the wake word detection sound still plays at the wrong time.
it is the same with all esp devices that the 'wakeword' detected sound plays after the command is issued and not wake word, the only time it does work in the right place is if the audio is outputted to a different media player within HA. I think the reason is because the mic and speaker cannot both be active at the same time.
When speaker.play is called, I think it would be reasonable not to expect the mic to be active while playing the sound. A potential solution to this issue is for speaker.play to turn off the mic while it is playing the sound and then turn the mic back on afterwards (assuming the mic is active when speaker.play is called).
You mentioned "a different media player within HA". I just want to make it clear that this scenario does not involve HA trying to play a sound. The sound is defined inside the ESPHome Yaml file and played via the voice_assistant on_wake_word_detected trigger.
The problem
Using the official esp32-s3-box-3.yaml, I have added playing a sound (using speaker.play) on trigger on_wake_word_detected and another sound on trigger on_stt_vad_end. The wake work sound is not played at the right point in time. The wake word sound is played after I give a command, not before. I've also tried using triggers on_listening and on_stt_vad_start, but these did not work either. I get the impression that the wake word sound is queued until after I give the command.
In order to get sounds to play, I had to comment out BLE in esp32-s3-box-3.yaml.
Which version of ESPHome has the issue?
2023.11.6
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
2023.11.3
What platform are you using?
ESP32-IDF
Board
esp32s3box
Component causing the issue
voice assistant
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response