From d9f14f6acbe9fc49fc35fa4385117764ab9a7948 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 19 Aug 2021 03:51:55 +0000 Subject: [PATCH] fix call --- deepspeech/frontend/augmentor/impulse_response.py | 1 + deepspeech/frontend/augmentor/noise_perturb.py | 1 + deepspeech/frontend/augmentor/online_bayesian_normalization.py | 1 + deepspeech/frontend/augmentor/resample.py | 1 + deepspeech/frontend/augmentor/shift_perturb.py | 1 + deepspeech/frontend/augmentor/spec_augment.py | 2 +- deepspeech/frontend/augmentor/speed_perturb.py | 1 + deepspeech/frontend/augmentor/volume_perturb.py | 1 + 8 files changed, 8 insertions(+), 1 deletion(-) diff --git a/deepspeech/frontend/augmentor/impulse_response.py b/deepspeech/frontend/augmentor/impulse_response.py index 01421fc65..b1a732ad8 100644 --- a/deepspeech/frontend/augmentor/impulse_response.py +++ b/deepspeech/frontend/augmentor/impulse_response.py @@ -34,6 +34,7 @@ class ImpulseResponseAugmentor(AugmentorBase): if not train: return self.transform_audio(x) + return x def transform_audio(self, audio_segment): """Add impulse response effect. diff --git a/deepspeech/frontend/augmentor/noise_perturb.py b/deepspeech/frontend/augmentor/noise_perturb.py index 11f5ed105..8be5931bc 100644 --- a/deepspeech/frontend/augmentor/noise_perturb.py +++ b/deepspeech/frontend/augmentor/noise_perturb.py @@ -40,6 +40,7 @@ class NoisePerturbAugmentor(AugmentorBase): if not train: return self.transform_audio(x) + return x def transform_audio(self, audio_segment): """Add background noise audio. diff --git a/deepspeech/frontend/augmentor/online_bayesian_normalization.py b/deepspeech/frontend/augmentor/online_bayesian_normalization.py index dc32a1808..4b5e2301e 100644 --- a/deepspeech/frontend/augmentor/online_bayesian_normalization.py +++ b/deepspeech/frontend/augmentor/online_bayesian_normalization.py @@ -48,6 +48,7 @@ class OnlineBayesianNormalizationAugmentor(AugmentorBase): if not train: return self.transform_audio(x) + return x def transform_audio(self, audio_segment): """Normalizes the input audio using the online Bayesian approach. diff --git a/deepspeech/frontend/augmentor/resample.py b/deepspeech/frontend/augmentor/resample.py index a862b184e..a8c0c6628 100644 --- a/deepspeech/frontend/augmentor/resample.py +++ b/deepspeech/frontend/augmentor/resample.py @@ -35,6 +35,7 @@ class ResampleAugmentor(AugmentorBase): if not train: return self.transform_audio(x) + return x def transform_audio(self, audio_segment): """Resamples the input audio to a target sample rate. diff --git a/deepspeech/frontend/augmentor/shift_perturb.py b/deepspeech/frontend/augmentor/shift_perturb.py index 6c78c528e..a76fb51c6 100644 --- a/deepspeech/frontend/augmentor/shift_perturb.py +++ b/deepspeech/frontend/augmentor/shift_perturb.py @@ -35,6 +35,7 @@ class ShiftPerturbAugmentor(AugmentorBase): if not train: return self.transform_audio(x) + return x def transform_audio(self, audio_segment): """Shift audio. diff --git a/deepspeech/frontend/augmentor/spec_augment.py b/deepspeech/frontend/augmentor/spec_augment.py index 1786099c8..ed593da4a 100644 --- a/deepspeech/frontend/augmentor/spec_augment.py +++ b/deepspeech/frontend/augmentor/spec_augment.py @@ -163,7 +163,7 @@ class SpecAugmentor(AugmentorBase): def __call__(self, x, train=True): if not train: return - self.transform_feature(x) + return self.transform_feature(x) def transform_feature(self, xs: np.ndarray): """ diff --git a/deepspeech/frontend/augmentor/speed_perturb.py b/deepspeech/frontend/augmentor/speed_perturb.py index 838c5cc29..eec2e5511 100644 --- a/deepspeech/frontend/augmentor/speed_perturb.py +++ b/deepspeech/frontend/augmentor/speed_perturb.py @@ -83,6 +83,7 @@ class SpeedPerturbAugmentor(AugmentorBase): if not train: return self.transform_audio(x) + return x def transform_audio(self, audio_segment): """Sample a new speed rate from the given range and diff --git a/deepspeech/frontend/augmentor/volume_perturb.py b/deepspeech/frontend/augmentor/volume_perturb.py index ffae1693e..d08f75c36 100644 --- a/deepspeech/frontend/augmentor/volume_perturb.py +++ b/deepspeech/frontend/augmentor/volume_perturb.py @@ -41,6 +41,7 @@ class VolumePerturbAugmentor(AugmentorBase): if not train: return self.transform_audio(x) + return x def transform_audio(self, audio_segment): """Change audio loadness.