From b8341da63dfa2baccff73c197e0e3dae336ef4de Mon Sep 17 00:00:00 2001 From: chrisxu2016 <823254351@qq.com> Date: Sun, 18 Jun 2017 16:23:30 +0800 Subject: [PATCH] add audio augmentation --- data_utils/audio.py | 3 ++- data_utils/speech.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data_utils/audio.py b/data_utils/audio.py index 1f75da8ac..3c671b69b 100755 --- a/data_utils/audio.py +++ b/data_utils/audio.py @@ -88,7 +88,8 @@ class AudioSegment(object): :rtype: AudioSegment :raises ValueError: If the number of segments is zero, or if the sample_rate of any two segments does not match. - :raises TypeError: If every segment in is not Audiosegment instance. + :raises TypeError: If every item in segments is not Audiosegment + instance. """ # Perform basic sanity-checks. if len(segments) == 0: diff --git a/data_utils/speech.py b/data_utils/speech.py index 443df68c6..66f22b247 100755 --- a/data_utils/speech.py +++ b/data_utils/speech.py @@ -75,7 +75,8 @@ class SpeechSegment(AudioSegment): :rtype: SpeechSegment :raises ValueError: If the number of segments is zero, or if the sample_rate of any two segments does not match. - :raises TypeError: If every segment in is not Audiosegment instance. + :raises TypeError: If every item in segments is not Audiosegment + instance. """ if len(segments) == 0: raise ValueError("No audio segments are given to concatenate.")