From 2c7fe19c8215a9a13d7a4645a005e121c74bb0e9 Mon Sep 17 00:00:00 2001 From: Xinyi Cheng <102612038+Xinyi-Cheng@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:25:42 +0800 Subject: [PATCH] [bigs] Fixed a bug caused by a type error (#696) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修正了因为类型错误导致的bug * remove ds_store --------- Co-authored-by: Cheng --- asteroid/data/librimix_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asteroid/data/librimix_dataset.py b/asteroid/data/librimix_dataset.py index 33105e641..429168e80 100644 --- a/asteroid/data/librimix_dataset.py +++ b/asteroid/data/librimix_dataset.py @@ -89,7 +89,7 @@ def __getitem__(self, idx): sources_list = [] # If there is a seg start point is set randomly if self.seg_len is not None: - start = random.randint(0, row["length"] - self.seg_len) + start = random.randint(0, int(row["length"] - self.seg_len)) stop = start + self.seg_len else: start = 0