Support specifying max speech duration for VAD. (#1348)

This commit is contained in:
Fangjun Kuang
2024-09-14 10:57:46 +08:00
committed by GitHub
parent 5d761712db
commit 1423ddb1f0
5 changed files with 70 additions and 7 deletions

View File

@@ -27,6 +27,11 @@ struct SileroVadModelConfig {
// 256, 512, 768 samples for 800 Hz
int32_t window_size = 512; // in samples
// If a speech segment is longer than this value, then we increase
// the threshold to 0.9. After finishing detecting the segment,
// the threshold value is reset to its original value.
float max_speech_duration = 20; // in seconds
SileroVadModelConfig() = default;
void Register(ParseOptions *po);