wangzhibo
10 天以前 220e4fab27b7f419b3e89e2f2d28ae789aac09d7
xiaozhi-esp32-2.2.6/main/application.h
@@ -106,6 +106,13 @@
    void StopListening();
    void SendListenDetect(const std::string& text, bool open_if_idle = true);
    bool SendListenDetectNow(const std::string& text);
    void HoldIdleForServerPrompt();
    void ReleaseHoldIdle();
    void StartListeningAfterPrompt();
    void ArmPendingDetectRetry(const std::string& text, int retries);
    bool IsAudioChannelConnected() const;
    void AnnounceReturnedToChat();
    void ReconnectAfterLesson(const std::string& detect);
    void Reboot();
    void WakeWordInvoke(const std::string& wake_word);
@@ -127,6 +134,7 @@
    void PlaySound(const std::string_view& sound);
    AudioService& GetAudioService() { return audio_service_; }
    void ApplyMp3CommandOnlyMic();
    bool IsOnMainLoop() const;
    void ResumeListeningAfterMp3Clip();
    void CloseShadowingListenWindow();
    
@@ -164,6 +172,7 @@
    bool sdcard_mp3_stop_requested_ = false;
    bool opening_audio_channel_ = false;
    bool suppress_wake_until_listen_ = false;
    bool hold_idle_for_prompt_ = false;
    bool network_error_suppressed_ = false;
    std::string pending_detect_text_;
    int pending_detect_retry_ticks_ = 0;
@@ -176,6 +185,7 @@
    bool tts_stop_pending_ = false;
    bool tts_stop_waiting_ = false;
    bool tts_idle_waiting_ = false;
    bool tts_session_end_ = false;
    bool tts_speaking_state_ready_ = false;
    uint32_t tts_activity_generation_ = 0;
    int tts_playback_empty_ticks_ = 0;
@@ -187,6 +197,7 @@
    int sleep_inhibit_count_ = 0;
    int clock_ticks_ = 0;
    TaskHandle_t activation_task_handle_ = nullptr;
    TaskHandle_t main_loop_task_ = nullptr;
    // Event handlers