diff --git a/bat_eval/cpu_detection.py b/bat_eval/cpu_detection.py index e6839dd..1cc7f90 100755 --- a/bat_eval/cpu_detection.py +++ b/bat_eval/cpu_detection.py @@ -100,7 +100,7 @@ def create_spec(self, audio, sampling_rate): max_freq=self.max_freq, min_freq=self.min_freq) hspec = self.sp.process_spectrogram(hspec, denoise_spec=self.denoise, smooth_spec=self.smooth_spec) - nsize = (np.ceil(hspec.shape[0]/2.0).astype(int), np.ceil(hspec.shape[1]/2.0).astype(int)) + nsize = (np.floor(hspec.shape[0]/2.0).astype(int), np.floor(hspec.shape[1]/2.0).astype(int)) spec = ch.aligned_malloc(nsize, np.float32) zoom(hspec, 0.5, output=spec, order=1)