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/conformer demo #204

Merged
merged 4 commits into from
May 28, 2021
Merged

Conversation

ebraraktas
Copy link
Contributor

Conformer demo fails for beam search. This fixes bug in Transformer.recognize_beam() and examples/demonstration/conformer.py script.

`Transducer.recognize_beam()` expects dictionary of input tensors containing `"input_length"`, therefore `inputs["input_length"]` should have been computed before calling this method. Calling `math_util.get_reduced_length(inputs["inputs_length"], ...)` reduces `input_length` again and causes recognition on short audio segment.

Another solution would be replacing `math_util.get_reduced_length(inputs["inputs_length"], ...)` with `math_util.get_reduced_length(inputs["inputs"].shape[1], ...)`, but as explained above it is already computed.
@ebraraktas ebraraktas force-pushed the fix/conformer-demo branch from 309b3d4 to 5186643 Compare May 28, 2021 12:41
@ebraraktas ebraraktas force-pushed the fix/conformer-demo branch from 5186643 to 9134eb4 Compare May 28, 2021 12:45
@nglehuy nglehuy merged commit c6eeb03 into TensorSpeech:main May 28, 2021
@ebraraktas ebraraktas deleted the fix/conformer-demo branch May 28, 2021 14:52
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