Spaces:
Sleeping
Sleeping
Typo fix
Browse files- sonogram.py +2 -2
sonogram.py
CHANGED
|
@@ -133,14 +133,14 @@ class Sonogram():
|
|
| 133 |
# Rename labels
|
| 134 |
currId = 0
|
| 135 |
mapping = {}
|
| 136 |
-
for label in diarization.
|
| 137 |
if label == 'group':
|
| 138 |
continue
|
| 139 |
else:
|
| 140 |
currId += 1
|
| 141 |
newLabel = f'SPEAKER_{currId:03d}'
|
| 142 |
mapping[label] = newLabel
|
| 143 |
-
diarization = diarization.
|
| 144 |
print("Time in seconds calculated")
|
| 145 |
return diarization, totalTimeInSeconds, waveform, sample_rate
|
| 146 |
|
|
|
|
| 133 |
# Rename labels
|
| 134 |
currId = 0
|
| 135 |
mapping = {}
|
| 136 |
+
for label in diarization.labels():
|
| 137 |
if label == 'group':
|
| 138 |
continue
|
| 139 |
else:
|
| 140 |
currId += 1
|
| 141 |
newLabel = f'SPEAKER_{currId:03d}'
|
| 142 |
mapping[label] = newLabel
|
| 143 |
+
diarization = diarization.rename_labels(mapping)
|
| 144 |
print("Time in seconds calculated")
|
| 145 |
return diarization, totalTimeInSeconds, waveform, sample_rate
|
| 146 |
|