Spaces:
Running
Running
jhj0517
commited on
Commit
·
15b3a25
1
Parent(s):
1ba51b4
Fix wrong device reference on diarizer
Browse files
modules/diarize/diarizer.py
CHANGED
@@ -50,10 +50,10 @@ class Diarizer:
|
|
50 |
"""
|
51 |
start_time = time.time()
|
52 |
|
53 |
-
if
|
54 |
-
device != self.device or
|
55 |
-
self.pipe is None):
|
56 |
device = self.device
|
|
|
|
|
57 |
self.update_pipe(
|
58 |
device=device,
|
59 |
use_auth_token=use_auth_token
|
@@ -91,6 +91,7 @@ class Diarizer:
|
|
91 |
device: str
|
92 |
Device for diarization.
|
93 |
"""
|
|
|
94 |
|
95 |
os.makedirs(self.model_dir, exist_ok=True)
|
96 |
|
|
|
50 |
"""
|
51 |
start_time = time.time()
|
52 |
|
53 |
+
if device is None:
|
|
|
|
|
54 |
device = self.device
|
55 |
+
|
56 |
+
if device != self.device or self.pipe is None:
|
57 |
self.update_pipe(
|
58 |
device=device,
|
59 |
use_auth_token=use_auth_token
|
|
|
91 |
device: str
|
92 |
Device for diarization.
|
93 |
"""
|
94 |
+
self.device = device
|
95 |
|
96 |
os.makedirs(self.model_dir, exist_ok=True)
|
97 |
|