From 65e68a9fc719d57f425cb5aa2e884768303396f8 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期一, 26 六月 2023 17:23:48 +0800
Subject: [PATCH] fix funasr-onnx-offline-rtf's log

---
 funasr/build_utils/build_streaming_iterator.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/funasr/build_utils/build_streaming_iterator.py b/funasr/build_utils/build_streaming_iterator.py
index ad36b4e..1b16cf4 100644
--- a/funasr/build_utils/build_streaming_iterator.py
+++ b/funasr/build_utils/build_streaming_iterator.py
@@ -18,14 +18,17 @@
         dtype: str = np.float32,
         num_workers: int = 1,
         use_collate_fn: bool = True,
+        preprocess_fn=None,
         ngpu: int = 0,
-        train: bool=False,
+        train: bool = False,
 ) -> DataLoader:
     """Build DataLoader using iterable dataset"""
     assert check_argument_types()
 
     # preprocess
-    if preprocess_args is not None:
+    if preprocess_fn is not None:
+        preprocess_fn = preprocess_fn
+    elif preprocess_args is not None:
         preprocess_args.task_name = task_name
         preprocess_fn = build_preprocess(preprocess_args, train)
     else:

--
Gitblit v1.9.1