From 6afd105e75a540c8c05991dcdfebd6a82f2a76d5 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 24 六月 2024 10:20:05 +0800
Subject: [PATCH] fixbug

---
 funasr/auto/auto_model.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index a6cd3a6..01e6aaf 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -92,7 +92,8 @@
                 if isinstance(data_i, str) and os.path.exists(data_i):
                     key = misc.extract_filename_without_extension(data_i)
                 else:
-                    key = "rand_key_" + "".join(random.choice(chars) for _ in range(13))
+                    if key is None:
+                        key = "rand_key_" + "".join(random.choice(chars) for _ in range(13))
                 key_list.append(key)
 
     else:  # raw text; audio sample point, fbank; bytes
@@ -110,6 +111,13 @@
 
     def __init__(self, **kwargs):
 
+        try:
+            from funasr.utils.version_checker import check_for_update
+
+            check_for_update()
+        except:
+            pass
+
         log_level = getattr(logging, kwargs.get("log_level", "INFO").upper())
         logging.basicConfig(level=log_level)
 

--
Gitblit v1.9.1