espnet.nets.pytorch_backend.nets_utils.trim_by_ctc_posterior
Less than 1 minute
espnet.nets.pytorch_backend.nets_utils.trim_by_ctc_posterior
espnet.nets.pytorch_backend.nets_utils.trim_by_ctc_posterior(h: Tensor, ctc_probs: Tensor, masks: Tensor, pos_emb: Tensor | None = None)
Trim the encoder hidden output using CTC posterior. The continuous frames in the tail that confidently represent blank symbols are trimmed.