From 7779fe0db0580e5d2ab5289738010b5bf4795e54 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Wed, 3 Feb 2021 07:12:58 +0000 Subject: [PATCH] fix issue 70 --- data_utils/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_utils/audio.py b/data_utils/audio.py index 94e2b52f..d7b88952 100644 --- a/data_utils/audio.py +++ b/data_utils/audio.py @@ -94,7 +94,7 @@ class AudioSegment(object): sample_rate = sndfile.samplerate duration = float(len(sndfile)) / sample_rate start = 0. if start is None else start - end = 0. if end is None else end + end = duration if end is None else end if start < 0.0: start += duration if end < 0.0: -- GitLab