@@ -286,12 +286,7 @@ def forward(
286
286
xs = self .global_cmvn (xs )
287
287
xs , pos_emb , masks = self .embed (xs , masks )
288
288
mask_pad = masks # (B, 1, T/subsample_rate)
289
- chunk_masks = add_optional_chunk_mask (xs , masks ,
290
- self .use_dynamic_chunk if streaming is True else False ,
291
- self .use_dynamic_left_chunk if streaming is True else False ,
292
- decoding_chunk_size if streaming is True else 0 ,
293
- self .static_chunk_size if streaming is True else 0 ,
294
- num_decoding_left_chunks if streaming is True else - 1 )
289
+ chunk_masks = add_optional_chunk_mask (xs , masks , False , False , 0 , self .static_chunk_size if streaming is True else 0 , - 1 )
295
290
# lookahead + conformer encoder
296
291
xs , _ = self .pre_lookahead_layer (xs )
297
292
xs = self .forward_layers (xs , chunk_masks , pos_emb , mask_pad )
@@ -304,12 +299,7 @@ def forward(
304
299
masks = ~ make_pad_mask (xs_lens , T ).unsqueeze (1 ) # (B, 1, T)
305
300
xs , pos_emb , masks = self .up_embed (xs , masks )
306
301
mask_pad = masks # (B, 1, T/subsample_rate)
307
- chunk_masks = add_optional_chunk_mask (xs , masks ,
308
- self .use_dynamic_chunk if streaming is True else False ,
309
- self .use_dynamic_left_chunk if streaming is True else False ,
310
- decoding_chunk_size if streaming is True else 0 ,
311
- self .static_chunk_size * self .up_layer .stride if streaming is True else 0 ,
312
- num_decoding_left_chunks if streaming is True else - 1 )
302
+ chunk_masks = add_optional_chunk_mask (xs , masks , False , False , 0 , self .static_chunk_size * self .up_layer .stride if streaming is True else 0 , - 1 )
313
303
xs = self .forward_up_layers (xs , chunk_masks , pos_emb , mask_pad )
314
304
315
305
if self .normalize_before :
0 commit comments