提交 3d4aba57 编写于 作者: chrisxu2014's avatar chrisxu2014

add audio augmentation

上级 193601a5
...@@ -88,7 +88,8 @@ class AudioSegment(object): ...@@ -88,7 +88,8 @@ class AudioSegment(object):
:rtype: AudioSegment :rtype: AudioSegment
:raises ValueError: If the number of segments is zero, or if the :raises ValueError: If the number of segments is zero, or if the
sample_rate of any two segments does not match. 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. # Perform basic sanity-checks.
if len(segments) == 0: if len(segments) == 0:
......
...@@ -75,7 +75,8 @@ class SpeechSegment(AudioSegment): ...@@ -75,7 +75,8 @@ class SpeechSegment(AudioSegment):
:rtype: SpeechSegment :rtype: SpeechSegment
:raises ValueError: If the number of segments is zero, or if the :raises ValueError: If the number of segments is zero, or if the
sample_rate of any two segments does not match. 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: if len(segments) == 0:
raise ValueError("No audio segments are given to concatenate.") raise ValueError("No audio segments are given to concatenate.")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册