Skip to content

Commit

Permalink
Merge pull request #97 from smly/gpu-vad-filter
Browse files Browse the repository at this point in the history
GPU acceleration when using VAD filters
  • Loading branch information
m-bain authored Feb 21, 2023
2 parents f7093e6 + 57f5957 commit 2b1ffa1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions whisperx/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,12 @@ def cli():
if hf_token is None:
print("Warning, no huggingface token used, needs to be saved in environment variable, otherwise will throw error loading VAD model...")
from pyannote.audio import Inference
vad_pipeline = Inference("pyannote/segmentation",
pre_aggregation_hook=lambda segmentation: segmentation,
use_auth_token=hf_token)
vad_pipeline = Inference(
"pyannote/segmentation",
pre_aggregation_hook=lambda segmentation: segmentation,
use_auth_token=hf_token,
device=torch.device(device),
)

diarize_pipeline = None
if diarize:
Expand Down

0 comments on commit 2b1ffa1

Please sign in to comment.