From 8c7b7e5feb68fda1fc4ddd627bad0f915358149e Mon Sep 17 00:00:00 2001
From: Zhanzhao (Deo) Liang <liangzhanzhao1985@gmail.com>
Date: 星期三, 25 十二月 2024 16:40:29 +0800
Subject: [PATCH] fix export_meta import of sense voice (#2334)

---
 funasr/models/paraformer_streaming/model.py |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/funasr/models/paraformer_streaming/model.py b/funasr/models/paraformer_streaming/model.py
index f287614..bbc9668 100644
--- a/funasr/models/paraformer_streaming/model.py
+++ b/funasr/models/paraformer_streaming/model.py
@@ -50,8 +50,6 @@
 
         super().__init__(*args, **kwargs)
 
-        # import pdb;
-        # pdb.set_trace()
         self.sampling_ratio = kwargs.get("sampling_ratio", 0.2)
 
         self.scama_mask = None
@@ -83,8 +81,6 @@
                 text: (Batch, Length)
                 text_lengths: (Batch,)
         """
-        # import pdb;
-        # pdb.set_trace()
         decoding_ind = kwargs.get("decoding_ind")
         if len(text_lengths.size()) > 1:
             text_lengths = text_lengths[:, 0]
@@ -202,10 +198,10 @@
             mask_chunk_predictor = self.encoder.overlap_chunk_cls.get_mask_chunk_predictor(
                 None, device=encoder_out.device, batch_size=encoder_out.size(0)
             )
-            mask_shfit_chunk = self.encoder.overlap_chunk_cls.get_mask_shfit_chunk(
+            mask_shift_chunk = self.encoder.overlap_chunk_cls.get_mask_shift_chunk(
                 None, device=encoder_out.device, batch_size=encoder_out.size(0)
             )
-            encoder_out = encoder_out * mask_shfit_chunk
+            encoder_out = encoder_out * mask_shift_chunk
         pre_acoustic_embeds, pre_token_length, pre_alphas, _ = self.predictor(
             encoder_out,
             ys_pad,
@@ -361,10 +357,10 @@
             mask_chunk_predictor = self.encoder.overlap_chunk_cls.get_mask_chunk_predictor(
                 None, device=encoder_out.device, batch_size=encoder_out.size(0)
             )
-            mask_shfit_chunk = self.encoder.overlap_chunk_cls.get_mask_shfit_chunk(
+            mask_shift_chunk = self.encoder.overlap_chunk_cls.get_mask_shift_chunk(
                 None, device=encoder_out.device, batch_size=encoder_out.size(0)
             )
-            encoder_out = encoder_out * mask_shfit_chunk
+            encoder_out = encoder_out * mask_shift_chunk
         pre_acoustic_embeds, pre_token_length, pre_alphas, pre_peak_index = self.predictor(
             encoder_out,
             None,

--
Gitblit v1.9.1