| | |
| | | |
| | | #include <memory> |
| | | #include <deque> |
| | | #include <vector> |
| | | #include <condition_variable> |
| | | #include <chrono> |
| | | #include <mutex> |
| | |
| | | |
| | | #include "audio_codec.h" |
| | | #include "audio_processor.h" |
| | | #include "processors/audio_debugger.h" |
| | | #include "wake_word.h" |
| | | #include "protocol.h" |
| | | #include "ogg_demuxer.h" |
| | |
| | | uint32_t playback_count = 0; |
| | | }; |
| | | |
| | | class AudioDebugger; |
| | | |
| | | class AudioService { |
| | | public: |
| | | AudioService(); |
| | |
| | | void Start(); |
| | | void Stop(); |
| | | void EncodeWakeWord(); |
| | | void AbortWakeWordEncode(); |
| | | std::unique_ptr<AudioStreamPacket> PopWakeWordPacket(); |
| | | const std::string& GetLastWakeWord() const; |
| | | bool IsVoiceDetected() const { return voice_detected_; } |
| | |
| | | |
| | | void EnableWakeWordDetection(bool enable); |
| | | void EnableVoiceProcessing(bool enable); |
| | | void ReleaseAfeRuntime(); |
| | | void ReleaseVoiceProcessorRuntime(); |
| | | void ClearWakeWordBuffers(); |
| | | void EnsureVoiceProcessorReady(); |
| | | void EnableAudioTesting(bool enable); |
| | | void EnableDeviceAec(bool enable); |