Add vad clear api for better performance (#366)

* Add vad clear api for better performance

* rename to make naming consistent and remove macro

* Fix linker error

* Fix Vad.kt
This commit is contained in:
yujinqiu
2023-10-16 14:40:47 +08:00
committed by GitHub
parent 55b6893885
commit d01682d968
9 changed files with 55 additions and 25 deletions

View File

@@ -76,6 +76,8 @@ class VoiceActivityDetector::Impl {
void Pop() { segments_.pop(); }
void Clear() { std::queue<SpeechSegment>().swap(segments_); }
const SpeechSegment &Front() const { return segments_.front(); }
void Reset() {
@@ -121,6 +123,8 @@ bool VoiceActivityDetector::Empty() const { return impl_->Empty(); }
void VoiceActivityDetector::Pop() { impl_->Pop(); }
void VoiceActivityDetector::Clear() { impl_->Clear(); }
const SpeechSegment &VoiceActivityDetector::Front() const {
return impl_->Front();
}