mirror of
https://github.com/esphome/esphome.git
synced 2025-09-07 13:52:20 +01:00
Add wake word phrase to voice assistant start command (#6290)
This commit is contained in:
@@ -6603,6 +6603,10 @@ bool VoiceAssistantRequest::decode_length(uint32_t field_id, ProtoLengthDelimite
|
||||
this->audio_settings = value.as_message<VoiceAssistantAudioSettings>();
|
||||
return true;
|
||||
}
|
||||
case 5: {
|
||||
this->wake_word_phrase = value.as_string();
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -6612,6 +6616,7 @@ void VoiceAssistantRequest::encode(ProtoWriteBuffer buffer) const {
|
||||
buffer.encode_string(2, this->conversation_id);
|
||||
buffer.encode_uint32(3, this->flags);
|
||||
buffer.encode_message<VoiceAssistantAudioSettings>(4, this->audio_settings);
|
||||
buffer.encode_string(5, this->wake_word_phrase);
|
||||
}
|
||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||
void VoiceAssistantRequest::dump_to(std::string &out) const {
|
||||
@@ -6633,6 +6638,10 @@ void VoiceAssistantRequest::dump_to(std::string &out) const {
|
||||
out.append(" audio_settings: ");
|
||||
this->audio_settings.dump_to(out);
|
||||
out.append("\n");
|
||||
|
||||
out.append(" wake_word_phrase: ");
|
||||
out.append("'").append(this->wake_word_phrase).append("'");
|
||||
out.append("\n");
|
||||
out.append("}");
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user