espnet2.s2t.ctc_utils.buffered_frame_counts
Less than 1 minute
espnet2.s2t.ctc_utils.buffered_frame_counts
espnet2.s2t.ctc_utils.buffered_frame_counts(frames_per_sec: float, speech_length: float, context_len_in_secs: float) → Tuple[int, int]
Return buffer and context lengths on the encoder’s frame grid.
Both durations must cover whole frames. Truncating a fractional frame would make the audio step differ from the number of retained posteriors, accumulating a timing error at every buffer join.
