mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
Fix voice assistant crash when no speaker configured (#7075)
This commit is contained in:
parent
fbab0aceb0
commit
c6c1d3a3ad
1 changed files with 3 additions and 1 deletions
|
@ -684,7 +684,9 @@ void VoiceAssistant::on_event(const api::VoiceAssistantEventResponse &msg) {
|
||||||
this->defer([this, text]() {
|
this->defer([this, text]() {
|
||||||
this->tts_start_trigger_->trigger(text);
|
this->tts_start_trigger_->trigger(text);
|
||||||
#ifdef USE_SPEAKER
|
#ifdef USE_SPEAKER
|
||||||
this->speaker_->start();
|
if (this->speaker_ != nullptr) {
|
||||||
|
this->speaker_->start();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue