pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/speechbrain/speechbrain/pull/2984

css" /> Fixed TransformerST bug with ASR masks by ffenix7 · Pull Request #2984 · speechbrain/speechbrain · GitHub
Skip to content

Comments

Fixed TransformerST bug with ASR masks#2984

Open
ffenix7 wants to merge 7 commits intospeechbrain:developfrom
ffenix7:develop
Open

Fixed TransformerST bug with ASR masks#2984
ffenix7 wants to merge 7 commits intospeechbrain:developfrom
ffenix7:develop

Conversation

@ffenix7
Copy link

@ffenix7 ffenix7 commented Oct 19, 2025

What does this PR do?

Fixes #2893
This pull request introduces a new method to the TransformerST model to handle mask creation for ASR tasks, and updates the code to use this method where appropriate.

ASR mask handling improvements:

  • Added a new method make_masks_for_asr to TransformerST.py, which generates the appropriate masks for ASR training, including handling the source padding mask based on training mode and waveform lengths.
  • Updated the forward_asr method to use the new make_masks_for_asr method instead of the generic make_masks (that was removed on commit 9ca48f2), ensuring the correct masks are applied for ASR tasks.
Before submitting
  • Did you read the contributor guideline?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Does your code adhere to project-specific code style and conventions?

PR review

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified
  • Confirm that the changes adhere to compatibility requirements (e.g., Python version, platform)
  • Review the self-review checklist to ensure the code is ready for review

@ffenix7 ffenix7 changed the title Fixed TransformerST bug with masks Fixed TransformerST bug with ASR masks Oct 19, 2025
@TParcollet
Copy link
Collaborator

Hi @ffenix7 could you fix the tests? Many thanks! Do you think that it could use another function from the TransformerASR.py file instead of this one?

@ffenix7
Copy link
Author

ffenix7 commented Nov 3, 2025

Hi @ffenix7 could you fix the tests? Many thanks! Do you think that it could use another function from the TransformerASR.py file instead of this one?

Hi @TParcollet ! What do you excatly mean by "fix the tests"? Also yes - actually it can use function from the TransformerASR.py file (make_transformer_src_tgt_masks function). I will change it.

@ffenix7
Copy link
Author

ffenix7 commented Nov 20, 2025

Hi @TParcollet ! Can you check the PR?

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.

TransformerST does not have a working forward_asr method

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy