| | |
| | | void Feed(std::vector<int16_t>&& data) override; |
| | | void Start() override; |
| | | void Stop() override; |
| | | void ReleaseRuntime() override; |
| | | bool EnsureRuntime() override; |
| | | bool IsRunning() override; |
| | | void OnOutput(std::function<void(std::vector<int16_t>&& data)> callback) override; |
| | | void OnVadStateChange(std::function<void(bool speaking)> callback) override; |
| | |
| | | std::function<void(std::vector<int16_t>&& data)> output_callback_; |
| | | std::function<void(bool speaking)> vad_state_change_callback_; |
| | | AudioCodec* codec_ = nullptr; |
| | | srmodel_list_t* models_list_ = nullptr; |
| | | int frame_duration_ms_ = 0; |
| | | int frame_samples_ = 0; |
| | | bool processor_task_started_ = false; |
| | | bool is_speaking_ = false; |
| | | std::vector<int16_t> input_buffer_; |
| | | std::mutex input_buffer_mutex_; |
| | | std::vector<int16_t> output_buffer_; |
| | | |
| | | bool CreateAfe(); |
| | | void AudioProcessorTask(); |
| | | }; |
| | | |