(self, audio16k: torch.Tensor, audio16k_length: torch.Tensor)
| 362 | |
| 363 | @torch.inference_mode() |
| 364 | def forward(self, audio16k: torch.Tensor, audio16k_length: torch.Tensor): |
| 365 | # Extract mel |
| 366 | mel, mel_length = self.feature_extractor(audio16k, audio16k_length) |
| 367 | # Forward model |
| 368 | semantic_feats, semantic_length = super().forward( |
| 369 | mel, mel_length, apply_position=True |
| 370 | ) |
| 371 | return semantic_feats, semantic_length |
| 372 | |
| 373 | |
| 374 | class WhisperAcousticEncoder(WhisperEncoder): |