Skip to content

Commit

Permalink
rename to make naming consistent and remove macro
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinqiu committed Oct 16, 2023
1 parent 6f10d1f commit 9497aff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sherpa-onnx/c-api/c-api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion swift-api-examples/SherpaOnnx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class SherpaOnnxVoiceActivityDetectorWrapper {
return SherpaOnnxVoiceActivityDetectorEmpty(vad) == 1
}

func isDetected() -> Bool {
func isSpeechDetected() -> Bool {
return SherpaOnnxVoiceActivityDetectorDetected(vad) == 1
}

Expand Down

0 comments on commit 9497aff

Please sign in to comment.