From 93399564c53c11e8203cd0912aa0cf4dce71c71b Mon Sep 17 00:00:00 2001 From: root Date: Tue, 7 Jan 2020 18:48:54 +0100 Subject: [PATCH] bug fix for sound normalization --- utils/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/audio.py b/utils/audio.py index 05694dce..708f0853 100644 --- a/utils/audio.py +++ b/utils/audio.py @@ -247,7 +247,7 @@ class AudioProcessor(object): print(f' [!] File cannot be trimmed for silence - {filename}') assert self.sample_rate == sr, "%s vs %s"%(self.sample_rate, sr) if self.sound_norm: - x = x / abs(x.max()) * 0.9 + x = x / abs(x).max() * 0.9 return x @staticmethod