Increase the default value of speech_pad_ms to 400 ms (#179)

This commit is contained in:
Guillaume Klein
2023-04-25 15:54:22 +02:00
committed by GitHub
parent 32dc625f11
commit 8cf5d5a4b3
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ def get_speech_timestamps(
max_speech_duration_s: float = float("inf"), max_speech_duration_s: float = float("inf"),
min_silence_duration_ms: int = 2000, min_silence_duration_ms: int = 2000,
window_size_samples: int = 1024, window_size_samples: int = 1024,
speech_pad_ms: int = 200, speech_pad_ms: int = 400,
) -> List[dict]: ) -> List[dict]:
"""This method is used for splitting long audios into speech chunks using silero VAD. """This method is used for splitting long audios into speech chunks using silero VAD.

View File

@@ -32,7 +32,7 @@ def test_vad(jfk_path):
segments, _ = model.transcribe( segments, _ = model.transcribe(
jfk_path, jfk_path,
vad_filter=True, vad_filter=True,
vad_parameters=dict(min_silence_duration_ms=500), vad_parameters=dict(min_silence_duration_ms=500, speech_pad_ms=200),
) )
segments = list(segments) segments = list(segments)