From 410a85402db06bf36a9d7acec5dc922012951242 Mon Sep 17 00:00:00 2001 From: "shixian.shi" Date: Tue, 6 Feb 2024 17:55:35 +0800 Subject: [PATCH] bug fix for numpy input --- funasr/models/campplus/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funasr/models/campplus/model.py b/funasr/models/campplus/model.py index 6706c84b5..b2d65f1b2 100644 --- a/funasr/models/campplus/model.py +++ b/funasr/models/campplus/model.py @@ -123,5 +123,5 @@ def inference(self, time3 = time.perf_counter() meta_data["extract_feat"] = f"{time3 - time2:0.3f}" meta_data["batch_data_time"] = np.array(speech_times).sum().item() / 16000.0 - results = [{"spk_embedding": self.forward(speech)}] + results = [{"spk_embedding": self.forward(speech.to(torch.float32))}] return results, meta_data \ No newline at end of file