From 410a85402db06bf36a9d7acec5dc922012951242 Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期二, 06 二月 2024 17:55:35 +0800
Subject: [PATCH] bug fix for numpy input

---
 funasr/datasets/audio_datasets/index_ds.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/funasr/datasets/audio_datasets/index_ds.py b/funasr/datasets/audio_datasets/index_ds.py
index 8e5b05c..c94d209 100644
--- a/funasr/datasets/audio_datasets/index_ds.py
+++ b/funasr/datasets/audio_datasets/index_ds.py
@@ -54,7 +54,11 @@
         return len(self.contents)
     
     def __getitem__(self, index):
-        return self.contents[index]
+        try:
+            data = self.contents[index]
+        except:
+            print(index)
+        return data
     
     def get_source_len(self, data_dict):
         return data_dict["source_len"]

--
Gitblit v1.9.1