ESPHome 2025.5.0
|
#include <voice_assistant.h>
Public Member Functions | |
VoiceAssistant () | |
void | loop () override |
void | setup () override |
float | get_setup_priority () const override |
void | start_streaming () |
void | start_streaming (struct sockaddr_storage *addr, uint16_t port) |
void | failed_to_start () |
void | set_microphone_source (microphone::MicrophoneSource *mic_source) |
void | set_micro_wake_word (micro_wake_word::MicroWakeWord *mww) |
void | set_speaker (speaker::Speaker *speaker) |
void | set_media_player (media_player::MediaPlayer *media_player) |
uint32_t | get_legacy_version () const |
uint32_t | get_feature_flags () const |
void | request_start (bool continuous, bool silence_detection) |
void | request_stop () |
void | on_event (const api::VoiceAssistantEventResponse &msg) |
void | on_audio (const api::VoiceAssistantAudio &msg) |
void | on_timer_event (const api::VoiceAssistantTimerEventResponse &msg) |
void | on_announce (const api::VoiceAssistantAnnounceRequest &msg) |
void | on_set_configuration (const std::vector< std::string > &active_wake_words) |
const Configuration & | get_configuration () |
bool | is_running () const |
void | set_continuous (bool continuous) |
bool | is_continuous () const |
void | set_use_wake_word (bool use_wake_word) |
void | set_noise_suppression_level (uint8_t noise_suppression_level) |
void | set_auto_gain (uint8_t auto_gain) |
void | set_volume_multiplier (float volume_multiplier) |
void | set_conversation_timeout (uint32_t conversation_timeout) |
void | reset_conversation_id () |
Trigger * | get_intent_end_trigger () const |
Trigger * | get_intent_start_trigger () const |
Trigger * | get_listening_trigger () const |
Trigger * | get_end_trigger () const |
Trigger * | get_start_trigger () const |
Trigger * | get_stt_vad_end_trigger () const |
Trigger * | get_stt_vad_start_trigger () const |
Trigger * | get_tts_stream_start_trigger () const |
Trigger * | get_tts_stream_end_trigger () const |
Trigger * | get_wake_word_detected_trigger () const |
Trigger< std::string > * | get_stt_end_trigger () const |
Trigger< std::string > * | get_tts_end_trigger () const |
Trigger< std::string > * | get_tts_start_trigger () const |
Trigger< std::string, std::string > * | get_error_trigger () const |
Trigger * | get_idle_trigger () const |
Trigger * | get_client_connected_trigger () const |
Trigger * | get_client_disconnected_trigger () const |
void | client_subscription (api::APIConnection *client, bool subscribe) |
api::APIConnection * | get_api_connection () const |
void | set_wake_word (const std::string &wake_word) |
Trigger< Timer > * | get_timer_started_trigger () const |
Trigger< Timer > * | get_timer_updated_trigger () const |
Trigger< Timer > * | get_timer_cancelled_trigger () const |
Trigger< Timer > * | get_timer_finished_trigger () const |
Trigger< std::vector< Timer > > * | get_timer_tick_trigger () const |
void | set_has_timers (bool has_timers) |
const std::unordered_map< std::string, Timer > & | get_timers () const |
![]() | |
virtual void | dump_config () |
float | get_actual_setup_priority () const |
void | set_setup_priority (float priority) |
virtual float | get_loop_priority () const |
priority of loop(). | |
void | call () |
virtual void | on_shutdown () |
virtual void | on_safe_shutdown () |
uint32_t | get_component_state () const |
virtual void | mark_failed () |
Mark this component as failed. | |
void | mark_failed (const char *message) |
bool | is_failed () const |
bool | is_ready () const |
virtual bool | can_proceed () |
bool | status_has_warning () const |
bool | status_has_error () const |
void | status_set_warning (const char *message="unspecified") |
void | status_set_error (const char *message="unspecified") |
void | status_clear_warning () |
void | status_clear_error () |
void | status_momentary_warning (const std::string &name, uint32_t length=5000) |
void | status_momentary_error (const std::string &name, uint32_t length=5000) |
bool | has_overridden_loop () const |
void | set_component_source (const char *source) |
Set where this component was loaded from for some debug messages. | |
const char * | get_component_source () const |
Get the integration where this component was declared as a string. | |
bool | should_warn_of_blocking (uint32_t blocking_time) |
Protected Member Functions | |
bool | allocate_buffers_ () |
void | clear_buffers_ () |
void | deallocate_buffers_ () |
void | set_state_ (State state) |
void | set_state_ (State state, State desired_state) |
void | signal_stop_ () |
void | start_playback_timeout_ () |
void | timer_tick_ () |
void | write_speaker_ () |
bool | start_udp_socket_ () |
![]() | |
virtual void | call_loop () |
virtual void | call_setup () |
virtual void | call_dump_config () |
void | set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f) |
Set an interval function with a unique name. | |
void | set_interval (uint32_t interval, std::function< void()> &&f) |
bool | cancel_interval (const std::string &name) |
Cancel an interval function. | |
void | set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
Set an retry function with a unique name. | |
void | set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
bool | cancel_retry (const std::string &name) |
Cancel a retry function. | |
void | set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f) |
Set a timeout function with a unique name. | |
void | set_timeout (uint32_t timeout, std::function< void()> &&f) |
bool | cancel_timeout (const std::string &name) |
Cancel a timeout function. | |
void | defer (const std::string &name, std::function< void()> &&f) |
Defer a callback to the next loop() call. | |
void | defer (std::function< void()> &&f) |
Defer a callback to the next loop() call. | |
bool | cancel_defer (const std::string &name) |
Cancel a defer callback using the specified name, name must not be empty. | |
Definition at line 93 of file voice_assistant.h.
esphome::voice_assistant::VoiceAssistant::VoiceAssistant | ( | ) |
Definition at line 29 of file voice_assistant.cpp.
|
protected |
Definition at line 85 of file voice_assistant.cpp.
|
protected |
Definition at line 117 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::client_subscription | ( | api::APIConnection * | client, |
bool | subscribe ) |
Definition at line 398 of file voice_assistant.cpp.
|
protected |
Definition at line 137 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::failed_to_start | ( | ) |
Definition at line 466 of file voice_assistant.cpp.
|
inline |
Definition at line 200 of file voice_assistant.h.
|
inline |
Definition at line 196 of file voice_assistant.h.
|
inline |
Definition at line 197 of file voice_assistant.h.
const Configuration & esphome::voice_assistant::VoiceAssistant::get_configuration | ( | ) |
Definition at line 893 of file voice_assistant.cpp.
|
inline |
Definition at line 181 of file voice_assistant.h.
|
inline |
Definition at line 193 of file voice_assistant.h.
|
inline |
Definition at line 130 of file voice_assistant.h.
|
inline |
Definition at line 194 of file voice_assistant.h.
|
inline |
Definition at line 178 of file voice_assistant.h.
|
inline |
Definition at line 179 of file voice_assistant.h.
|
inline |
Definition at line 121 of file voice_assistant.h.
|
inline |
Definition at line 180 of file voice_assistant.h.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 40 of file voice_assistant.cpp.
|
inline |
Definition at line 182 of file voice_assistant.h.
|
inline |
Definition at line 190 of file voice_assistant.h.
|
inline |
Definition at line 183 of file voice_assistant.h.
|
inline |
Definition at line 184 of file voice_assistant.h.
|
inline |
Definition at line 206 of file voice_assistant.h.
|
inline |
Definition at line 207 of file voice_assistant.h.
|
inline |
Definition at line 204 of file voice_assistant.h.
|
inline |
Definition at line 208 of file voice_assistant.h.
|
inline |
Definition at line 205 of file voice_assistant.h.
|
inline |
Definition at line 210 of file voice_assistant.h.
|
inline |
Definition at line 191 of file voice_assistant.h.
|
inline |
Definition at line 192 of file voice_assistant.h.
|
inline |
Definition at line 187 of file voice_assistant.h.
|
inline |
Definition at line 186 of file voice_assistant.h.
|
inline |
Definition at line 189 of file voice_assistant.h.
|
inline |
Definition at line 166 of file voice_assistant.h.
|
inline |
Definition at line 164 of file voice_assistant.h.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 162 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::on_announce | ( | const api::VoiceAssistantAnnounceRequest & | msg | ) |
Definition at line 840 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::on_audio | ( | const api::VoiceAssistantAudio & | msg | ) |
Definition at line 772 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::on_event | ( | const api::VoiceAssistantEventResponse & | msg | ) |
Definition at line 597 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::on_set_configuration | ( | const std::vector< std::string > & | active_wake_words | ) |
Definition at line 872 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::on_timer_event | ( | const api::VoiceAssistantTimerEventResponse & | msg | ) |
Definition at line 788 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::request_start | ( | bool | continuous, |
bool | silence_detection ) |
Definition at line 518 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::request_stop | ( | ) |
Definition at line 533 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::reset_conversation_id | ( | ) |
Definition at line 157 of file voice_assistant.cpp.
|
inline |
Definition at line 173 of file voice_assistant.h.
|
inline |
Definition at line 165 of file voice_assistant.h.
|
inline |
Definition at line 175 of file voice_assistant.h.
|
inline |
Definition at line 209 of file voice_assistant.h.
|
inline |
Definition at line 115 of file voice_assistant.h.
|
inline |
Definition at line 106 of file voice_assistant.h.
|
inline |
Definition at line 104 of file voice_assistant.h.
|
inline |
Definition at line 170 of file voice_assistant.h.
|
inline |
Definition at line 109 of file voice_assistant.h.
|
protected |
Definition at line 453 of file voice_assistant.cpp.
|
protected |
Definition at line 460 of file voice_assistant.cpp.
|
inline |
Definition at line 168 of file voice_assistant.h.
|
inline |
Definition at line 174 of file voice_assistant.h.
|
inline |
Definition at line 202 of file voice_assistant.h.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 31 of file voice_assistant.cpp.
|
protected |
Definition at line 575 of file voice_assistant.cpp.
|
protected |
Definition at line 586 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::start_streaming | ( | ) |
Definition at line 472 of file voice_assistant.cpp.
void esphome::voice_assistant::VoiceAssistant::start_streaming | ( | struct sockaddr_storage * | addr, |
uint16_t | port ) |
Definition at line 488 of file voice_assistant.cpp.
|
protected |
Definition at line 42 of file voice_assistant.cpp.
|
protected |
Definition at line 827 of file voice_assistant.cpp.
|
protected |
Definition at line 380 of file voice_assistant.cpp.
|
protected |
Definition at line 246 of file voice_assistant.h.
|
protected |
Definition at line 299 of file voice_assistant.h.
|
protected |
Definition at line 285 of file voice_assistant.h.
|
protected |
Definition at line 243 of file voice_assistant.h.
|
protected |
Definition at line 244 of file voice_assistant.h.
|
protected |
Definition at line 303 of file voice_assistant.h.
|
protected |
Definition at line 294 of file voice_assistant.h.
|
protected |
Definition at line 291 of file voice_assistant.h.
|
protected |
Definition at line 277 of file voice_assistant.h.
|
protected |
Definition at line 287 of file voice_assistant.h.
|
protected |
Definition at line 297 of file voice_assistant.h.
|
protected |
Definition at line 223 of file voice_assistant.h.
Definition at line 228 of file voice_assistant.h.
|
protected |
Definition at line 240 of file voice_assistant.h.
|
protected |
Definition at line 255 of file voice_assistant.h.
Definition at line 241 of file voice_assistant.h.
Definition at line 225 of file voice_assistant.h.
|
protected |
Definition at line 226 of file voice_assistant.h.
Definition at line 227 of file voice_assistant.h.
|
protected |
Definition at line 275 of file voice_assistant.h.
|
protected |
Definition at line 270 of file voice_assistant.h.
|
protected |
Definition at line 272 of file voice_assistant.h.
|
protected |
Definition at line 271 of file voice_assistant.h.
|
protected |
Definition at line 258 of file voice_assistant.h.
|
protected |
Definition at line 306 of file voice_assistant.h.
|
protected |
Definition at line 284 of file voice_assistant.h.
|
protected |
Definition at line 281 of file voice_assistant.h.
|
protected |
Definition at line 289 of file voice_assistant.h.
|
protected |
Definition at line 292 of file voice_assistant.h.
|
protected |
Definition at line 222 of file voice_assistant.h.
|
protected |
Definition at line 261 of file voice_assistant.h.
|
protected |
Definition at line 262 of file voice_assistant.h.
|
protected |
Definition at line 263 of file voice_assistant.h.
|
protected |
Definition at line 264 of file voice_assistant.h.
|
protected |
Definition at line 265 of file voice_assistant.h.
Definition at line 229 of file voice_assistant.h.
|
protected |
Definition at line 296 of file voice_assistant.h.
|
protected |
Definition at line 267 of file voice_assistant.h.
|
protected |
Definition at line 237 of file voice_assistant.h.
Definition at line 231 of file voice_assistant.h.
|
protected |
Definition at line 230 of file voice_assistant.h.
|
protected |
Definition at line 253 of file voice_assistant.h.
|
protected |
Definition at line 251 of file voice_assistant.h.
|
protected |
Definition at line 250 of file voice_assistant.h.
|
protected |
Definition at line 256 of file voice_assistant.h.
|
protected |
Definition at line 254 of file voice_assistant.h.
|
protected |
Definition at line 252 of file voice_assistant.h.
|
protected |
Definition at line 248 of file voice_assistant.h.
|
protected |
Definition at line 238 of file voice_assistant.h.
|
protected |
Definition at line 239 of file voice_assistant.h.
|
protected |
Definition at line 234 of file voice_assistant.h.
|
protected |
Definition at line 233 of file voice_assistant.h.
|
protected |
Definition at line 300 of file voice_assistant.h.
|
protected |
Definition at line 283 of file voice_assistant.h.
|
protected |
Definition at line 286 of file voice_assistant.h.
|
protected |
Definition at line 266 of file voice_assistant.h.
|
protected |
Definition at line 279 of file voice_assistant.h.
|
protected |
Definition at line 236 of file voice_assistant.h.