Skip to content

Commit

Permalink
Merge pull request #9 from yqzhishen/patch-1
Browse files Browse the repository at this point in the history
Fix inconsistent shape comparison
  • Loading branch information
flutydeer authored May 24, 2023
2 parents 1bc68cc + 52bc567 commit 16402cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slicer2.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def slice(self, waveform):
samples = waveform.mean(axis=0)
else:
samples = waveform
if samples.shape[0] <= self.min_length:
if (samples.shape[0] + self.hop_size - 1) // self.hop_size <= self.min_length:
return [waveform]
rms_list = get_rms(y=samples, frame_length=self.win_size, hop_length=self.hop_size).squeeze(0)
sil_tags = []
Expand Down

0 comments on commit 16402cf

Please sign in to comment.