Add APIs about max speech duration in VAD for various programming languages (#1349)

This commit is contained in:
Fangjun Kuang
2024-09-14 12:30:13 +08:00
committed by GitHub
parent 1423ddb1f0
commit e7ffcbd677
31 changed files with 88 additions and 9 deletions

View File

@@ -550,14 +550,16 @@ func sherpaOnnxSileroVadModelConfig(
threshold: Float = 0.5,
minSilenceDuration: Float = 0.25,
minSpeechDuration: Float = 0.5,
windowSize: Int = 512
windowSize: Int = 512,
maxSpeechDuration: Float = 5.0
) -> SherpaOnnxSileroVadModelConfig {
return SherpaOnnxSileroVadModelConfig(
model: toCPointer(model),
threshold: threshold,
min_silence_duration: minSilenceDuration,
min_speech_duration: minSpeechDuration,
window_size: Int32(windowSize)
window_size: Int32(windowSize),
max_speech_duration: maxSpeechDuration
)
}