Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Blankskip bug. #1403

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix Blankskip bug. #1403

wants to merge 2 commits into from

Conversation

kobenaxie
Copy link
Contributor

No description provided.

The output of frame reducer may longer than input, fix it.
@yfyeung
Copy link
Collaborator

yfyeung commented Dec 7, 2023

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]

@kobenaxie
Copy link
Contributor Author

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.

@yfyeung
Copy link
Collaborator

yfyeung commented Dec 11, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants