diff --git a/run_CNN.py b/run_CNN.py
index e15d1df2ecd14cb2521f8693f659165caf8e506c..cdeca01e501766c8770b91786d648022b2e305df 100644
--- a/run_CNN.py
+++ b/run_CNN.py
@@ -35,7 +35,7 @@ class Dataset(torch.utils.data.Dataset):
             try:
                 info = sf.info(os.path.join(args.audio_folder, fn))
                 duration, fs = info.duration, info.samplerate
-                self.samples.extend([{'fn':fn, 'offset':offset, 'fs':fs} for offset in np.arange(0, duration+.01 - args.lensample, args.lensample)])
+                self.samples.extend([{'fn':fn, 'offset':offset, 'fs':fs} for offset in np.arange(0, duration+1e-10 - args.lensample, args.lensample)])
             except:
                 continue
             assert info.channels > args.channel, f"The desired channel is unavailable for the audio file {fn}"