From 742f2e927dabec0de209cdb2c35cd515855569d1 Mon Sep 17 00:00:00 2001
From: hnluo <haoneng.lhn@alibaba-inc.com>
Date: 星期二, 14 二月 2023 17:34:36 +0800
Subject: [PATCH] Update iterable_dataset.py

---
 funasr/datasets/iterable_dataset.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/funasr/datasets/iterable_dataset.py b/funasr/datasets/iterable_dataset.py
index 2001df9..2f97e78 100644
--- a/funasr/datasets/iterable_dataset.py
+++ b/funasr/datasets/iterable_dataset.py
@@ -224,7 +224,7 @@
                 name = self.path_name_type_list[i][1]
                 _type = self.path_name_type_list[i][2]
                 if _type == "sound":
-                    audio_type = os.path.basename(value).split(".")[1].lower()
+                    audio_type = os.path.basename(value).split(".")[-1].lower()
                     if audio_type not in SUPPORT_AUDIO_TYPE_SETS:
                         raise NotImplementedError(
                             f'Not supported audio type: {audio_type}')
@@ -326,7 +326,7 @@
                 # 2.a. Load data streamingly
                 for value, (path, name, _type) in zip(values, self.path_name_type_list):
                     if _type == "sound":
-                        audio_type = os.path.basename(value).split(".")[1].lower()
+                        audio_type = os.path.basename(value).split(".")[-1].lower()
                         if audio_type not in SUPPORT_AUDIO_TYPE_SETS:
                             raise NotImplementedError(
                                 f'Not supported audio type: {audio_type}')

--
Gitblit v1.9.1