espnet2.s2st.synthesizer.translatotron2.DurationPredictor
Less than 1 minute
espnet2.s2st.synthesizer.translatotron2.DurationPredictor
class espnet2.s2st.synthesizer.translatotron2.DurationPredictor(cfg)
Bases: Module
Non-Attentive Tacotron (NAT) Duration Predictor module.
Initializes internal Module state, shared by both nn.Module and ScriptModule.
forward(encoder_outputs, input_lengths=None)
Forward Duration Predictor
- Parameters:
- encoder_outputs – [batch_size, hidden_length, encoder_lstm_dim]
- input_lengths – [batch_size, hidden_length]
- Returns: [batch_size, hidden_length]