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

@@ -548,7 +548,11 @@ class SherpaOnnxVoiceActivityDetectorWrapper {
}
func isEmpty() -> Bool {
return SherpaOnnxVoiceActivityDetectorEmpty(vad) == 1 ? true : false
return SherpaOnnxVoiceActivityDetectorEmpty(vad) == 1
}
func isDetected() -> Bool {
return SherpaOnnxVoiceActivityDetectorDetected(vad) == 1
}
func pop() {