Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,12 @@ import numpy as np
|
|
14 |
from pyannote.audio import Pipeline
|
15 |
|
16 |
# Initialize the speaker diarization pipeline
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
# Check if CUDA is available and set the device
|
20 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
14 |
from pyannote.audio import Pipeline
|
15 |
|
16 |
# Initialize the speaker diarization pipeline
|
17 |
+
try:
|
18 |
+
pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization")
|
19 |
+
print("Speaker diarization pipeline initialized successfully")
|
20 |
+
except Exception as e:
|
21 |
+
print(f"Error initializing speaker diarization pipeline: {str(e)}")
|
22 |
+
pipeline = None
|
23 |
|
24 |
# Check if CUDA is available and set the device
|
25 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|