diff --git a/README.md b/README.md index ff9d2aa5..fae1e075 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ To label the transcript with speaker ID's (set number of speakers if known e.g. To run on CPU instead of GPU (and for running on Mac OS X): - whisperx path/to/audio.wav --compute_type int8 + whisperx path/to/audio.wav --compute_type int8 --device cpu ### Other languages @@ -166,6 +166,7 @@ See more examples in other languages [here](EXAMPLES.md). ```python import whisperx import gc +from whisperx.diarize import DiarizationPipeline device = "cuda" audio_file = "audio.mp3" @@ -196,7 +197,7 @@ print(result["segments"]) # after alignment # import gc; import torch; gc.collect(); torch.cuda.empty_cache(); del model_a # 3. Assign speaker labels -diarize_model = whisperx.diarize.DiarizationPipeline(use_auth_token=YOUR_HF_TOKEN, device=device) +diarize_model = DiarizationPipeline(use_auth_token=YOUR_HF_TOKEN, device=device) # add min/max number of speakers if known diarize_segments = diarize_model(audio) diff --git a/whisperx/asr.py b/whisperx/asr.py index 0b47127d..67d8a8be 100644 --- a/whisperx/asr.py +++ b/whisperx/asr.py @@ -319,7 +319,8 @@ def load_model( whisper_arch - The name of the Whisper model to load. device - The device to load the model on. compute_type - The compute type to use for the model. - vad_method - The vad method to use. vad_model has higher priority if is not None. + vad_model - The vad model to manually assign. + vad_method - The vad method to use. vad_model has a higher priority if it is not None. options - A dictionary of options to use for the model. language - The language of the model. (use English for now) model - The WhisperModel instance to use. diff --git a/whisperx/transcribe.py b/whisperx/transcribe.py index 46a77468..8eca427a 100644 --- a/whisperx/transcribe.py +++ b/whisperx/transcribe.py @@ -119,7 +119,6 @@ def transcribe_task(args: dict, parser: argparse.ArgumentParser): # Part 1: VAD & ASR Loop results = [] - tmp_results = [] # model = load_model(model_name, device=device, download_root=model_dir) model = load_model( model_name,