icefall icon indicating copy to clipboard operation
icefall copied to clipboard

Fix Blankskip bug.

Open kobenaxie opened this issue 1 year ago • 3 comments

kobenaxie avatar Dec 07 '23 13:12 kobenaxie

1 1 1 0

1 1 1 1

1 1 0 0

limit_lens, which is the maximum reduced frames for each utt, is [2, 1, 3] instead of [1, 1, 1]

yfyeung avatar Dec 07 '23 14:12 yfyeung

1 1 1 0

1 1 1 1

1 1 0 0

limit_lens, which is the maximum reduced frames for each utt, is [2, 1, 3] instead of [1, 1, 1]

Yes, but limit_lens + y_lens can not greater than x_lens. For example, if x_lens = [10, 12], y_lens = [1, 2], then T = 12, and limit_lens = T - y_lens = [11, 10] , where limit_lens[0] = 11 > x_lens[0] = 10, which is ilegal.


Besides, frame reduce should be performed on valid frames(without padding), so should perform mask non_blank_mask = non_blank_mask & ~padding_mask, as the ctc peak in padding part is not an actual peak.

kobenaxie avatar Dec 11 '23 03:12 kobenaxie

For example, if x_lens = [10, 12], y_lens = [1, 2], then T = 12, and limit_lens = T - y_lens = [11, 10] , where limit_lens[0] = 11 > x_lens[0] = 10, which is ilegal.

limit_lens[0] = 11 < T = 12, which is legal there.

To be exact, limit_lens is the maximum reduced frames for each utt with padding in the current design.

yfyeung avatar Dec 11 '23 11:12 yfyeung