SYSTRAN / faster-whisper

Faster Whisper transcription with CTranslate2
MIT License
12.66k stars 1.06k forks source link

Update vad.py with more sane speech_pad_ms: int = 4000 #1153

Closed montvid closed 6 days ago

montvid commented 6 days ago

In all my tests speech_pad_ms: int = 400 was too small. All other VAD numbers were good. Making speech_pad_ms: int = 4000 2x the min_silence_duration_ms: int = 2000 fixed all my problems. Maybe someone forgot to add another 0?

Here it is doubled too: https://github.com/jhj0517/Whisper-WebUI/blob/master/configs/default_parameters.yaml vad: vad_filter: false threshold: 0.5 min_speech_duration_ms: 250 max_speech_duration_s: 9999 min_silence_duration_ms: 1000 speech_pad_ms: 2000

MahmoudAshraf97 commented 6 days ago

Hello, it doesn't make sense to pad 4s on each side when most silences are less than that, the padding here is to account for slight segment boundaries inacccuracies i.e. not to cut a word in the middle, if 4000 works the best for you, then I guess turning the VAD off completely might be a better solution. Anyways, I'm not in favor of changing the default value, users have the option to change it if their own use cases need it

montvid commented 6 days ago

Thank you for the explanation. I checked my transcription and indeed it has sometimes 1 word or 1 sentence missing. A major headache how to adjust the VAD :(