add audio augmentation

pull/2/head
chrisxu2016 8 years ago
parent 5ca270d30a
commit b8341da63d

@ -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:

@ -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.")

Loading…
Cancel
Save