espnet2.torch_utils.check_look_ahead.frame_last_sample
Less than 1 minute
espnet2.torch_utils.check_look_ahead.frame_last_sample
espnet2.torch_utils.check_look_ahead.frame_last_sample(hop_length: int, win_length: int, look_ahead: int = 0, center: bool = False) → Callable[[int], int]
last_input for a model on waveforms whose frames come from an STFT.
Frame i covers samples [i * hop, i * hop + win) (shifted left by win // 2 with center=True); with look-ahead L frames it may read the last sample of frame i + L.
