From 7b6fe29f00e43fbae15b5558d329f3a7093f7456 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 30 Dec 2019 12:49:17 +0000 Subject: [PATCH] sound norm fix --- utils/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/audio.py b/utils/audio.py index cba5b344..05694dce 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 / x.max() * 0.9 + x = x / abs(x.max()) * 0.9 return x @staticmethod