Spaces:
Sleeping
Sleeping
Auth
Browse files- diarization.py +2 -2
diarization.py
CHANGED
@@ -8,8 +8,8 @@ def perform_diarization(audio_file_path, translated_file_path, output_dir='./aud
|
|
8 |
|
9 |
# Initialize diarization pipeline
|
10 |
accesstoken = os.environ['Diarization']
|
11 |
-
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1",
|
12 |
-
|
13 |
# Send pipeline to GPU (when available)
|
14 |
pipeline.to(torch.device("cuda" if torch.cuda.is_available() else "cpu"))
|
15 |
|
|
|
8 |
|
9 |
# Initialize diarization pipeline
|
10 |
accesstoken = os.environ['Diarization']
|
11 |
+
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1", use_auth_token=accesstoken )
|
12 |
+
|
13 |
# Send pipeline to GPU (when available)
|
14 |
pipeline.to(torch.device("cuda" if torch.cuda.is_available() else "cpu"))
|
15 |
|