From ffb96a4f62b54272b7f96ffa5f463269c091e702 Mon Sep 17 00:00:00 2001
From: speech_asr <wangjiaming.wjm@alibaba-inc.com>
Date: 星期四, 13 四月 2023 10:17:36 +0800
Subject: [PATCH] update

---
 funasr/tasks/abs_task.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/funasr/tasks/abs_task.py b/funasr/tasks/abs_task.py
index 775cba8..8d63b27 100644
--- a/funasr/tasks/abs_task.py
+++ b/funasr/tasks/abs_task.py
@@ -1582,10 +1582,11 @@
     ) -> AbsIterFactory:
         assert check_argument_types()
 
-        if args.frontend_conf is not None and "fs" in args.frontend_conf:
-            dest_sample_rate = args.frontend_conf["fs"]
-        else:
-            dest_sample_rate = 16000
+        if hasattr(args, "frontend_conf"):
+            if args.frontend_conf is not None and "fs" in args.frontend_conf:
+                dest_sample_rate = args.frontend_conf["fs"]
+            else:
+                dest_sample_rate = 16000
 
         dataset = ESPnetDataset(
             iter_options.data_path_and_name_and_type,

--
Gitblit v1.9.1