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 word boundaries in ctm dumps of lattices with subsampling #72

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

SimBe195
Copy link
Collaborator

When performing recognition, the traceback contains word boundaries in the form of integers that represent output time frames of the model in the case of time-synchronous decoding. These word boundaries are then written into the lattice.

Later, when dumping the lattice to a .ctm file, these boundaries are divided by 100 to form start- and end-times as well as durations of words. This assumes that a frame shift on the output time axis is 1/100 seconds (i.e. 10ms) which is wrong when subsampling is performed in the model (or if one was to use feature extraction with a different frame shift). This leads to wrong word boundaries in the .ctm file.

This PR replaces the / 100.0 by a multiplication with a configurable frame shift.

@SimBe195 SimBe195 merged commit a942e39 into master Mar 27, 2024
@SimBe195 SimBe195 deleted the subsampled_wordboundaries_ctm_fix branch March 27, 2024 10:13
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