We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f180f9 commit afef580Copy full SHA for afef580
pyannote/audio/utils/signal.py
@@ -274,7 +274,7 @@ def __call__(self, scores: SlidingWindowFeature) -> Annotation:
274
275
for k, k_scores in enumerate(scores.data.T):
276
label = k if scores.labels is None else scores.labels[k]
277
-
+
278
# Detect transitions
279
is_active = k_scores > self.onset
280
transitions = np.diff(is_active.astype(int))
@@ -287,7 +287,7 @@ def __call__(self, scores: SlidingWindowFeature) -> Annotation:
287
288
# If the last frame is active, add it as an end
289
if is_active[-1]:
290
- ends = np.append(ends, len(is_active))
+ ends = np.append(ends, len(is_active) - 1)
291
292
# Create segments
293
for start, end in zip(starts, ends):
0 commit comments