From 0d36a5e176224123c826a254e80c61b7b6dc435a Mon Sep 17 00:00:00 2001
From: wu0792 <wu0792@users.noreply.github.com>
Date: 星期四, 25 七月 2024 18:55:29 +0800
Subject: [PATCH] Fix Typo (#1960)

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

diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index a82f6ed..acd4c72 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -114,7 +114,7 @@
         try:
             from funasr.utils.version_checker import check_for_update
 
-            check_for_update()
+            check_for_update(disable=kwargs.get("disable_update", False))
         except:
             pass
 
@@ -337,7 +337,7 @@
         end_vad = time.time()
 
         #  FIX(gcf): concat the vad clips for sense vocie model for better aed
-        if kwargs.get("merge_vad", False):
+        if cfg.get("merge_vad", False):
             for i in range(len(res)):
                 res[i]["value"] = merge_vad(
                     res[i]["value"], kwargs.get("merge_length_s", 15) * 1000
@@ -511,8 +511,8 @@
                 sv_output = postprocess(all_segments, None, labels, spk_embedding.cpu())
                 if self.spk_mode == "vad_segment":  # recover sentence_list
                     sentence_list = []
-                    for res, vadsegment in zip(restored_data, vadsegments):
-                        if "timestamp" not in res:
+                    for rest, vadsegment in zip(restored_data, vadsegments):
+                        if "timestamp" not in rest:
                             logging.error(
                                 "Only 'iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch' \
                                            and 'iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch'\
@@ -522,8 +522,8 @@
                             {
                                 "start": vadsegment[0],
                                 "end": vadsegment[1],
-                                "sentence": res["text"],
-                                "timestamp": res["timestamp"],
+                                "sentence": rest["text"],
+                                "timestamp": rest["timestamp"],
                             }
                         )
                 elif self.spk_mode == "punc_segment":

--
Gitblit v1.9.1