提交 a3e86dd8 编写于 作者: H Hui Zhang

fix call

上级 c8174340
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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):
"""
......
......@@ -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
......
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册