1
0
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:
Jesse Hills
2023-05-31 16:30:53 +12:00
committed by GitHub
parent f9f335e692
commit 1ea5d90ea3
12 changed files with 176 additions and 25 deletions

View File

@@ -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;
}
}