| | |
| | | bool IsVoiceDetected() const { return voice_detected_; } |
| | | bool IsIdle(); |
| | | void WaitForPlaybackQueueEmpty(); |
| | | bool IsPlaybackQueueEmpty(); |
| | | bool IsWakeWordRunning() const { return xEventGroupGetBits(event_group_) & AS_EVENT_WAKE_WORD_RUNNING; } |
| | | bool IsAudioProcessorRunning() const { return xEventGroupGetBits(event_group_) & AS_EVENT_AUDIO_PROCESSOR_RUNNING; } |
| | | bool IsAfeWakeWord(); |
| | | |
| | | void EnableWakeWordDetection(bool enable); |
| | | void EnableVoiceProcessing(bool enable); |
| | | void EnsureVoiceProcessorReady(); |
| | | void EnableAudioTesting(bool enable); |
| | | void EnableDeviceAec(bool enable); |
| | | |
| | |
| | | void PlaySound(const std::string_view& sound); |
| | | bool ReadAudioData(std::vector<int16_t>& data, int sample_rate, int samples); |
| | | void ResetDecoder(); |
| | | void KeepCodecReadyForPlayback(); |
| | | void SetAudioPowerInhibit(bool inhibit); |
| | | void SetModelsList(srmodel_list_t* models_list); |
| | | |
| | | private: |
| | |
| | | bool voice_detected_ = false; |
| | | bool service_stopped_ = true; |
| | | bool audio_input_need_warmup_ = false; |
| | | bool audio_power_inhibit_ = false; |
| | | |
| | | esp_timer_handle_t audio_power_timer_ = nullptr; |
| | | std::chrono::steady_clock::time_point last_input_time_; |