-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add ASR-EOU models #14740
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
base: main
Are you sure you want to change the base?
Add ASR-EOU models #14740
Conversation
Signed-off-by: Weiqing Wang <[email protected]>
Signed-off-by: Weiqing Wang <[email protected]>
Signed-off-by: Weiqing Wang <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: Weiqing Wang <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
…o end_of_utterance
Signed-off-by: Weiqing Wang <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
…o end_of_utterance
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
| self._feat_in = feat_in | ||
| # Add 1 for blank char | ||
| self._num_classes = num_classes + 1 | ||
| self._num_classes = num_classes + 1 if add_blank else num_classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make it as a general frame-level classifier
Signed-off-by: stevehuang52 <[email protected]>
…ed with implicit (fall through) returns Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: He Huang (Steve) <[email protected]>
…ed with implicit (fall through) returns Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: He Huang (Steve) <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
…losed Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: He Huang (Steve) <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: He Huang (Steve) <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
…eou_pr Signed-off-by: stevehuang52 <[email protected]>
Signed-off-by: stevehuang52 <[email protected]>
| raise ValueError(f"Unknown mode {self.mode}") | ||
|
|
||
|
|
||
| class ConformerMultiLayerFeatureExtractor(NeuralModule, Exportable): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove to use the one from conformer_encoder.py to avoid duplicates
| # Restore checkpoint | ||
| ckpt_path = cfg.pop('init_from_ptl_ckpt') | ||
| ckpt = torch.load(ckpt_path, map_location=map_location) | ||
| ckpt = torch.load(ckpt_path, map_location=map_location, weights_only=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix to avoid loading error
Signed-off-by: stevehuang52 <[email protected]>
| transcripts: Optional[torch.Tensor] = None, | ||
| transcript_lengths: Optional[torch.Tensor] = None, | ||
| compute_wer: bool = False, | ||
| keep_hypotheses: bool = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the option to maintain hypothesis for later usage, e.g., in calculating EOU metrics
|
|
||
| # B,D,T -> B,T,D | ||
| masks = masks.transpose(1, 2) | ||
| if masks is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix bug when masks is None
| OmegaConf.save(metadata_yaml, new_metadata_path, resolve=True) | ||
|
|
||
| def _read_manifest(self, manifest_path: str, config: ASRTarredDatasetConfig): | ||
| def _read_manifest(self, manifest_path: Union[str, List[str]], config: ASRTarredDatasetConfig): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the option to read from multiple files
Important
The
Update branchbutton must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
Add ASR-EOU models
Collection: [asr]
Changelog