MCPcopy Create free account
hub / github.com/FireRedTeam/FireRedTTS2 / forward

Method forward

fireredtts2/codec/whisper.py:364–371  ·  view source on GitHub ↗
(self, audio16k: torch.Tensor, audio16k_length: torch.Tensor)

Source from the content-addressed store, hash-verified

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
374class WhisperAcousticEncoder(WhisperEncoder):

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected