mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
Expose the max_end_silence_time to the user (#1532)
This commit is contained in:
parent
9c0735b7df
commit
a6a9d29bbd
@ -543,6 +543,11 @@ class FsmnVADStreaming(nn.Module):
|
||||
cache["frontend"] = {}
|
||||
cache["prev_samples"] = torch.empty(0)
|
||||
cache["encoder"] = {}
|
||||
|
||||
if kwargs.get("max_end_silence_time") is not None:
|
||||
# update the max_end_silence_time
|
||||
self.vad_opts.max_end_silence_time = kwargs.get("max_end_silence_time")
|
||||
|
||||
windows_detector = WindowDetector(self.vad_opts.window_size_ms,
|
||||
self.vad_opts.sil_to_speech_time_thres,
|
||||
self.vad_opts.speech_to_sil_time_thres,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user