espnet2.s2st.tgt_feats_extract.log_spectrogram.LogSpectrogram
espnet2.s2st.tgt_feats_extract.log_spectrogram.LogSpectrogram
class espnet2.s2st.tgt_feats_extract.log_spectrogram.LogSpectrogram(n_fft: int = 1024, win_length: int | None = None, hop_length: int = 256, window: str | None = 'hann', center: bool = True, normalized: bool = False, onesided: bool = True)
Bases: AbsTgtFeatsExtract
Conventional frontend structure for ASR
Stft -> log-amplitude-spec
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(input: Tensor, input_lengths: Tensor | None = None) → Tuple[Tensor, Tensor]
Defines the computation performed at every call.
Should be overridden by all subclasses.
NOTE
Although the recipe for forward pass needs to be defined within this function, one should call the Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
get_parameters() → Dict[str, Any]
Return the parameters required by Vocoder
output_size() → int
spectrogram() → bool