1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 08:42:18 +01:00

Fix silence detection flag on voice assistant (#5120)

This commit is contained in:
Jesse Hills
2023-07-19 11:38:47 +12:00
committed by GitHub
parent 837c749cd7
commit 417d45939f
9 changed files with 20 additions and 12 deletions

View File

@@ -25,10 +25,9 @@ namespace voice_assistant {
// Version 1: Initial version
// Version 2: Adds raw speaker support
// Version 3: Adds continuous support
// Version 3: Unused/skip
static const uint32_t INITIAL_VERSION = 1;
static const uint32_t SPEAKER_SUPPORT = 2;
static const uint32_t SILENCE_DETECTION_SUPPORT = 3;
class VoiceAssistant : public Component {
public:
@@ -48,9 +47,6 @@ class VoiceAssistant : public Component {
uint32_t get_version() const {
#ifdef USE_SPEAKER
if (this->speaker_ != nullptr) {
if (this->silence_detection_) {
return SILENCE_DETECTION_SUPPORT;
}
return SPEAKER_SUPPORT;
}
#endif