From e840295ab66168387bd45a0a41f84e4a47044375 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 07:04:35 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- espnet2/train/preprocessor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/espnet2/train/preprocessor.py b/espnet2/train/preprocessor.py index 55d9239c697..7f5da2cff19 100644 --- a/espnet2/train/preprocessor.py +++ b/espnet2/train/preprocessor.py @@ -1422,7 +1422,9 @@ def _speech_process( volume_scale = self.volume_low ma = np.max(np.abs(data[self.speech_name])) if ma != 0: - self._apply_to_all_signals(data, lambda x: x * volume_scale / ma, num_spk) + self._apply_to_all_signals( + data, lambda x: x * volume_scale / ma, num_spk + ) if self.categories and "category" in data: category = data.pop("category") @@ -1534,7 +1536,9 @@ def __call__( singing = data[self.singing_name] ma = np.max(np.abs(singing)) if ma != 0: - data[self.singing_name] = singing * self.singing_volume_normalize / ma + data[self.singing_name] = ( + singing * self.singing_volume_normalize / ma + ) if self.midi_name in data and self.label_name in data: # Load label info