From 9497affbfd86b5117ef0164e1217256a0aae8428 Mon Sep 17 00:00:00 2001 From: yujinqiu Date: Mon, 16 Oct 2023 11:27:23 +0800 Subject: [PATCH] rename to make naming consistent and remove macro --- sherpa-onnx/c-api/c-api.cc | 6 +++--- swift-api-examples/SherpaOnnx.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sherpa-onnx/c-api/c-api.cc b/sherpa-onnx/c-api/c-api.cc index 1e945ae3e..ca97da25f 100644 --- a/sherpa-onnx/c-api/c-api.cc +++ b/sherpa-onnx/c-api/c-api.cc @@ -493,17 +493,17 @@ int32_t SherpaOnnxVoiceActivityDetectorDetected( return p->impl->IsSpeechDetected(); } -SHERPA_ONNX_API void SherpaOnnxVoiceActivityDetectorPop( +void SherpaOnnxVoiceActivityDetectorPop( SherpaOnnxVoiceActivityDetector *p) { p->impl->Pop(); } -SHERPA_ONNX_API void SherpaOnnxVoiceActivityDetectorClear( +void SherpaOnnxVoiceActivityDetectorClear( SherpaOnnxVoiceActivityDetector *p) { p->impl->Clear(); } -SHERPA_ONNX_API const SherpaOnnxSpeechSegment * +const SherpaOnnxSpeechSegment * SherpaOnnxVoiceActivityDetectorFront(SherpaOnnxVoiceActivityDetector *p) { const sherpa_onnx::SpeechSegment &segment = p->impl->Front(); diff --git a/swift-api-examples/SherpaOnnx.swift b/swift-api-examples/SherpaOnnx.swift index 6c74ba459..e786d7cc7 100644 --- a/swift-api-examples/SherpaOnnx.swift +++ b/swift-api-examples/SherpaOnnx.swift @@ -551,7 +551,7 @@ class SherpaOnnxVoiceActivityDetectorWrapper { return SherpaOnnxVoiceActivityDetectorEmpty(vad) == 1 } - func isDetected() -> Bool { + func isSpeechDetected() -> Bool { return SherpaOnnxVoiceActivityDetectorDetected(vad) == 1 }