From f691014c8a97f2ea27dc72c9d3b374bdd05aa6c9 Mon Sep 17 00:00:00 2001
From: speech_asr <wangjiaming.wjm@alibaba-inc.com>
Date: 星期三, 15 三月 2023 15:43:18 +0800
Subject: [PATCH] update

---
 funasr/models/frontend/wav_frontend.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/funasr/models/frontend/wav_frontend.py b/funasr/models/frontend/wav_frontend.py
index 8e17102..ca22175 100644
--- a/funasr/models/frontend/wav_frontend.py
+++ b/funasr/models/frontend/wav_frontend.py
@@ -493,10 +493,10 @@
         for i in range(batch_size):
             waveform_length = input_lengths[i]
             waveform = input[i][:waveform_length]
-            waveform = waveform.unsqueeze(0).numpy()
+            waveform = waveform.numpy()
             mat = eend_ola_feature.stft(waveform, self.frame_length, self.frame_shift)
             mat = eend_ola_feature.transform(mat)
-            mat = mat.splice(mat, context_size=self.lfr_m)
+            mat = eend_ola_feature.splice(mat, context_size=self.lfr_m)
             mat = mat[::self.lfr_n]
             mat = torch.from_numpy(mat)
             feat_length = mat.size(0)

--
Gitblit v1.9.1