Skip to content

Commit

Permalink
Merge pull request #9 from vogelbam/fix-spectrogram-segments
Browse files Browse the repository at this point in the history
Fix computation of spectrogram segments
  • Loading branch information
mbsantiago authored May 17, 2024
2 parents 6f76d88 + 1505da0 commit 22ee77b
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 22ee77b

Please sign in to comment.