Skip to content

Commit

Permalink
Make vad-related parameters configurable for batched inference. (#923)
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-plus authored Jul 24, 2024
1 parent eb83902 commit 83a368e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions faster_whisper/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ def __init__(
device: Union[int, str, "torch.device"] = -1,
chunk_length: int = 30,
vad_device: Union[int, str, "torch.device"] = "auto",
vad_onset: float = 0.500,
vad_offset: float = 0.363,
framework="pt",
language: Optional[str] = None,
**kwargs,
Expand All @@ -133,8 +135,8 @@ def __init__(
self._batch_size = kwargs.pop("batch_size", None)
self._num_workers = 0
self.use_vad_model = use_vad_model
self.vad_onset = 0.500
self.vad_offset = 0.363
self.vad_onset = vad_onset
self.vad_offset = vad_offset
self.vad_model_path = os.path.join(get_assets_path(), "pyannote_vad_model.bin")
self.vad_model = None

Expand Down

0 comments on commit 83a368e

Please sign in to comment.