Expose VAD isDetected api to Swift (#356)

This commit is contained in:
yujinqiu
2023-10-12 15:11:58 +08:00
committed by GitHub
parent 32da5ecf02
commit f6566c8ace
3 changed files with 15 additions and 1 deletions

View File

@@ -488,6 +488,11 @@ int32_t SherpaOnnxVoiceActivityDetectorEmpty(
return p->impl->Empty();
}
int32_t SherpaOnnxVoiceActivityDetectorDetected(
SherpaOnnxVoiceActivityDetector *p) {
return p->impl->IsSpeechDetected();
}
SHERPA_ONNX_API void SherpaOnnxVoiceActivityDetectorPop(
SherpaOnnxVoiceActivityDetector *p) {
p->impl->Pop();