mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
Fix write_speaker without speaker in config (#5847)
This commit is contained in:
parent
4b6fbd5db0
commit
b8ee0dedec
1 changed files with 2 additions and 0 deletions
|
@ -344,6 +344,7 @@ void VoiceAssistant::loop() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef USE_SPEAKER
|
||||
void VoiceAssistant::write_speaker_() {
|
||||
if (this->speaker_buffer_size_ > 0) {
|
||||
size_t written = this->speaker_->play(this->speaker_buffer_, this->speaker_buffer_size_);
|
||||
|
@ -357,6 +358,7 @@ void VoiceAssistant::write_speaker_() {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void VoiceAssistant::client_subscription(api::APIConnection *client, bool subscribe) {
|
||||
if (!subscribe) {
|
||||
|
|
Loading…
Reference in a new issue