Skip to content
Snippets Groups Projects
Commit cc5ba9fa authored by ferrari's avatar ferrari
Browse files

Fix len song

parent ecd25405
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,8 @@ def load_file(in_path, channel, low, high):
song = song[:, channel]
sos = sg.butter(3, [low, high], 'bandpass', fs=sr, output='sos')
song = sg.sosfiltfilt(sos, song)
if len(song) < 20*sr:
song = np.pad(song, (1, 20*sr), mode='constant')
frac = Fraction(FSSR, sr)
song_resample = sg.resample_poly(song, frac.numerator, frac.denominator)
print('Done processing')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment