Skip to content

Commit

Permalink
Remove url from VoiceAssistantAnnounceFinished
Browse files Browse the repository at this point in the history
  • Loading branch information
synesthesiam committed Sep 4, 2024
1 parent 3293e2c commit ea8f49a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions esphome/components/voice_assistant/voice_assistant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,7 @@ void VoiceAssistant::loop() {
this->set_state_(State::IDLE, State::IDLE);

api::VoiceAssistantAnnounceFinished msg;
msg.media_id = this->announce_media_id_;
this->api_client_->send_voice_assistant_announce_finished(msg);
this->announce_media_id_ = "";
});
}
break;
Expand Down Expand Up @@ -761,7 +759,6 @@ void VoiceAssistant::on_event(const api::VoiceAssistantEventResponse &msg) {
this->defer([this, url]() {
#ifdef USE_MEDIA_PLAYER
if (this->media_player_ != nullptr) {
this->announce_media_id_ = url;
this->media_player_->make_call().set_media_url(url).set_announcement(true).perform();
}
#endif
Expand Down Expand Up @@ -924,7 +921,6 @@ void VoiceAssistant::on_announce(const api::VoiceAssistantAnnounceRequest &msg)
#ifdef USE_MEDIA_PLAYER
if (this->media_player_ != nullptr) {
this->tts_start_trigger_->trigger(msg.text);
this->announce_media_id_ = msg.media_id;
this->media_player_->make_call().set_media_url(msg.media_id).set_announcement(true).perform();
this->set_state_(State::STREAMING_RESPONSE, State::STREAMING_RESPONSE);
this->tts_end_trigger_->trigger(msg.media_id);
Expand Down
1 change: 0 additions & 1 deletion esphome/components/voice_assistant/voice_assistant.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ class VoiceAssistant : public Component {
#endif
#ifdef USE_MEDIA_PLAYER
media_player::MediaPlayer *media_player_{nullptr};
std::string announce_media_id_{""};
#endif

bool local_output_{false};
Expand Down

0 comments on commit ea8f49a

Please sign in to comment.