espnet2.gan_tts.jets.alignments.viterbi_decode
Less than 1 minute
espnet2.gan_tts.jets.alignments.viterbi_decode
espnet2.gan_tts.jets.alignments.viterbi_decode(log_p_attn, text_lengths, feats_lengths)
Extract duration from an attention probability matrix
- Parameters:
- log_p_attn (Tensor) – Batched log probability of attention matrix (B, T_feats, T_text).
- text_lengths (Tensor) – Text length tensor (B,).
- feats_legnths (Tensor) – Feature length tensor (B,).
- Returns: Batched token duration extracted from log_p_attn (B, T_text). Tensor: Binarization loss tensor ().
- Return type: Tensor