def collect_feats(self, text: torch.Tensor, text_lengths: torch.Tensor, speech: torch.Tensor, speech_lengths: torch.Tensor, spembs: Optional[torch.Tensor]=None, sids: Optional[torch.Tensor]=None, lids: Optional[torch.Tensor]=None) -> Dict[(str, torch.Tensor)]:
    'Calculate features and return them as a dict.\n\n        Args:\n            text (Tensor): Text index tensor (B, T_text).\n            text_lengths (Tensor): Text length tensor (B,).\n            speech (Tensor): Speech waveform tensor (B, T_wav).\n            speech_lengths (Tensor): Speech length tensor (B, 1).\n            spembs (Optional[Tensor]): Speaker embedding tensor (B, D).\n            sids (Optional[Tensor]): Speaker index tensor (B, 1).\n            lids (Optional[Tensor]): Language ID tensor (B, 1).\n\n        Returns:\n            Dict[str, Tensor]: Dict of features.\n\n        '
    feats = None
    if (self.feats_extract is not None):
        (feats, feats_lengths) = self.feats_extract(speech, speech_lengths)
    feats_dict = {}
    if (feats is not None):
        feats_dict.update(feats=feats, feats_lengths=feats_lengths)
    return feats_dict
Calculate features and return them as a dict.

Args:
    text (Tensor): Text index tensor (B, T_text).
    text_lengths (Tensor): Text length tensor (B,).
    speech (Tensor): Speech waveform tensor (B, T_wav).
    speech_lengths (Tensor): Speech length tensor (B, 1).
    spembs (Optional[Tensor]): Speaker embedding tensor (B, D).
    sids (Optional[Tensor]): Speaker index tensor (B, 1).
    lids (Optional[Tensor]): Language ID tensor (B, 1).

Returns:
    Dict[str, Tensor]: Dict of features.
def collect_feats(self, text: torch.Tensor, text_lengths: torch.Tensor, speech: torch.Tensor, speech_lengths: torch.Tensor, spembs: Optional[torch.Tensor]=None, sids: Optional[torch.Tensor]=None, lids: Optional[torch.Tensor]=None) -> Dict[(str, torch.Tensor)]:
    'Calculate features and return them as a dict.\n\n        Args:\n            text (Tensor): Text index tensor (B, T_text).\n            text_lengths (Tensor): Text length tensor (B,).\n            speech (Tensor): Speech waveform tensor (B, T_wav).\n            speech_lengths (Tensor): Speech length tensor (B, 1).\n            spembs (Optional[Tensor]): Speaker embedding tensor (B, D).\n            sids (Optional[Tensor]): Speaker index tensor (B, 1).\n            lids (Optional[Tensor]): Language ID tensor (B, 1).\n\n        Returns:\n            Dict[str, Tensor]: Dict of features.\n\n        '
    feats = None
    if (self.feats_extract is not None):
        (feats, feats_lengths) = self.feats_extract(speech, speech_lengths)
    feats_dict = {}
    if (feats is not None):
        feats_dict.update(feats=feats, feats_lengths=feats_lengths)
    return feats_dict