From 729597ca744c46a836d927b65fa0e472850d1947 Mon Sep 17 00:00:00 2001 From: Masao-Someki Date: Sun, 15 Oct 2023 00:10:37 +0900 Subject: [PATCH] Bug fix for #76 --- .../export/asr/models/encoders/contextual_block_xformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/espnet_onnx/export/asr/models/encoders/contextual_block_xformer.py b/espnet_onnx/export/asr/models/encoders/contextual_block_xformer.py index 1ce9146..cdb8a84 100644 --- a/espnet_onnx/export/asr/models/encoders/contextual_block_xformer.py +++ b/espnet_onnx/export/asr/models/encoders/contextual_block_xformer.py @@ -104,7 +104,7 @@ def forward( ] # (B, L, overlap) block_num = max(0, xs_pad.size(1) - self.overlap_size) // self.hop_size - res_frame_num = xs_pad.size(1) - self.hop_size * block_num - 1 + res_frame_num = xs_pad.size(1) - self.hop_size * block_num buffer_after_downsampling = xs_pad[:, -res_frame_num:] xs_pad = xs_pad[:, : block_num * self.hop_size + self.overlap_size]