From 29290f574eb2f8aa9c2cf19b9aaf131a2fd1c3ff Mon Sep 17 00:00:00 2001 From: mrq Date: Wed, 23 Aug 2023 21:49:22 +0000 Subject: [PATCH] should fix issue that arises when trying to prepare the dataset without slicing segments --- src/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.py b/src/utils.py index 1eaefb7..49dc060 100755 --- a/src/utils.py +++ b/src/utils.py @@ -2535,7 +2535,7 @@ def prepare_dataset( voice, use_segments=False, text_length=0, audio_length=0, p duration = 0 for segment in result['segments']: - duration = max(duration, result['segments'][segment]['end']) + duration = max(duration, segment['end']) if duration >= MAX_TRAINING_DURATION: message = f"Audio too large, using segments: {filename}"