Skip to content

Commit

Permalink
Fix computation of spectrogram segments
Browse files Browse the repository at this point in the history
  • Loading branch information
vogelbam committed Mar 26, 2024
1 parent 66aafa3 commit 1505da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion front/src/hooks/spectrogram/useRecordingSegments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function getSegments(
}

const hop = duration * (1 - overlap);
const numSegments = Math.ceil((fullDuration - hop) / hop);
const numSegments = Math.ceil((fullDuration - (duration - hop)) / hop);
return Array(numSegments)
.fill(0)
.map((_, index: number) => {
Expand Down

0 comments on commit 1505da0

Please sign in to comment.