From c0e72dd1ba86c19205ee633673b2497d18a68077 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 11 一月 2024 17:36:59 +0800
Subject: [PATCH] Merge branch 'funasr1.0' of github.com:alibaba-damo-academy/FunASR into funasr1.0 add

---
 funasr/models/campplus/model.py |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/funasr/models/campplus/model.py b/funasr/models/campplus/model.py
index 84938cc..7b1e098 100644
--- a/funasr/models/campplus/model.py
+++ b/funasr/models/campplus/model.py
@@ -109,13 +109,9 @@
         audio_sample_list = load_audio_text_image_video(data_in, fs=16000, audio_fs=kwargs.get("fs", 16000), data_type="sound")
         time2 = time.perf_counter()
         meta_data["load_data"] = f"{time2 - time1:0.3f}"
-        speech, speech_lengths = extract_feature(audio_sample_list)
+        speech, speech_lengths, speech_times = extract_feature(audio_sample_list)
         time3 = time.perf_counter()
         meta_data["extract_feat"] = f"{time3 - time2:0.3f}"
-        meta_data["batch_data_time"] = np.array(speech_lengths).sum().item() / 16000.0
-        # import pdb; pdb.set_trace()
-        results = []
-        embeddings = self.forward(speech)
-        for embedding in embeddings:
-            results.append({"spk_embedding":embedding})
+        meta_data["batch_data_time"] = np.array(speech_times).sum().item() / 16000.0
+        results = [{"spk_embedding": self.forward(speech)}]
         return results, meta_data
\ No newline at end of file

--
Gitblit v1.9.1