mirror of
https://github.com/esphome/esphome.git
synced 2025-09-27 07:32:22 +01:00
Continuous voice_assistant and silence detection (#4892)
This commit is contained in:
@@ -428,16 +428,16 @@ void APIServer::on_shutdown() {
|
||||
}
|
||||
|
||||
#ifdef USE_VOICE_ASSISTANT
|
||||
bool APIServer::start_voice_assistant() {
|
||||
bool APIServer::start_voice_assistant(const std::string &conversation_id) {
|
||||
for (auto &c : this->clients_) {
|
||||
if (c->request_voice_assistant(true))
|
||||
if (c->request_voice_assistant(true, conversation_id))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void APIServer::stop_voice_assistant() {
|
||||
for (auto &c : this->clients_) {
|
||||
if (c->request_voice_assistant(false))
|
||||
if (c->request_voice_assistant(false, ""))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user