mirror of
https://github.com/esphome/esphome.git
synced 2025-01-31 10:10:56 +00:00
Fix voice_assistant without a speaker (#5558)
This commit is contained in:
parent
cdc4f7f59b
commit
19736f6e53
@ -316,8 +316,8 @@ void VoiceAssistant::loop() {
|
|||||||
this->speaker_buffer_index_ = 0;
|
this->speaker_buffer_index_ = 0;
|
||||||
memset(this->speaker_buffer_, 0, SPEAKER_BUFFER_SIZE);
|
memset(this->speaker_buffer_, 0, SPEAKER_BUFFER_SIZE);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
this->wait_for_stream_end_ = false;
|
this->wait_for_stream_end_ = false;
|
||||||
|
#endif
|
||||||
this->set_state_(State::IDLE, State::IDLE);
|
this->set_state_(State::IDLE, State::IDLE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -586,7 +586,9 @@ void VoiceAssistant::on_event(const api::VoiceAssistantEventResponse &msg) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case api::enums::VOICE_ASSISTANT_TTS_STREAM_START: {
|
case api::enums::VOICE_ASSISTANT_TTS_STREAM_START: {
|
||||||
|
#ifdef USE_SPEAKER
|
||||||
this->wait_for_stream_end_ = true;
|
this->wait_for_stream_end_ = true;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case api::enums::VOICE_ASSISTANT_TTS_STREAM_END: {
|
case api::enums::VOICE_ASSISTANT_TTS_STREAM_END: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user