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:
@@ -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
|
||||
|
Reference in New Issue
Block a user