docstr: SyllableScoreFeats forward function.
  
  Args:
      label: (Batch, Nsamples)
      label_lengths: (Batch)
      midi: (Batch, Nsamples)
      midi_lengths: (Batch)
      duration: (Batch, Nsamples)
      duration_lengths: (Batch)
  
  Returns:
      output: (Batch, Frames)
docstr_tok: ["SyllableScoreFeats","forward","function",".","Args",":","label",":","(","Batch",",","Nsamples",")","label_lengths",":","(","Batch",")","midi",":","(","Batch",",","Nsamples",")","midi_lengths",":","(","Batch",")","duration",":","(","Batch",",","Nsamples",")","duration_lengths",":","(","Batch",")","Returns",":","output",":","(","Batch",",","Frames",")"]
code: def forward(
      self,
      label: Optional[torch.Tensor] = None,
      label_lengths: Optional[torch.Tensor] = None,
      midi: Optional[torch.Tensor] = None,
      midi_lengths: Optional[torch.Tensor] = None,
      duration: Optional[torch.Tensor] = None,
      duration_lengths: Optional[torch.Tensor] = None,
  ) -> Tuple[
      torch.Tensor,
      torch.Tensor,
      torch.Tensor,
      torch.Tensor,
      torch.Tensor,
      torch.Tensor,
  ]:
      """SyllableScoreFeats forward function.
  
      Args:
          label: (Batch, Nsamples)
          label_lengths: (Batch)
          midi: (Batch, Nsamples)
          midi_lengths: (Batch)
          duration: (Batch, Nsamples)
          duration_lengths: (Batch)
  
      Returns:
          output: (Batch, Frames)
      """
      assert label.shape == midi.shape and midi.shape == duration.shape
      assert (
          label_lengths.shape == midi_lengths.shape
          and midi_lengths.shape == duration_lengths.shape
      )
  
      bs = label.size(0)
      seg_label, seg_label_lengths = [], []
      seg_midi, seg_midi_lengths = [], []
      seg_duration, seg_duration_lengths = [], []
  
      for i in range(bs):
          seg = self.get_segments(
              label=label[i],
              label_lengths=label_lengths[i],
              midi=midi[i],
              midi_lengths=midi_lengths[i],
              duration=duration[i],
              duration_lengths=duration_lengths[i],
          )
          seg_label.append(seg[0])
          seg_label_lengths.append(seg[1])
          seg_midi.append(seg[2])
          seg_midi_lengths.append(seg[3])
          seg_duration.append(seg[6])
          seg_duration_lengths.append(seg[7])
  
      seg_label = torch.LongTensor(ListsToTensor(seg_label)).to(
          label.device
      )
      seg_label_lengths = torch.LongTensor(seg_label_lengths).to(
          label.device
      )
      seg_midi = torch.LongTensor(ListsToTensor(seg_midi)).to(
          label.device
      )
      seg_midi_lengths = torch.LongTensor(seg_midi_lengths).to(
          label.device
      )
      seg_duration = torch.LongTensor(ListsToTensor(seg_duration)).to(
          label.device
      )
      seg_duration_lengths = torch.LongTensor(seg_duration_lengths).to(
          label.device
      )
  
      return (
          seg_label,
          seg_label_lengths,
          seg_midi,
          seg_midi_lengths,
          seg_duration,
          seg_duration_lengths,
      )
  
imports: from typing import Any, Dict, Optional, Tuple, Union
  import torch
  from typeguard import check_argument_types
  from espnet2.tts.feats_extract.abs_feats_extract import AbsFeatsExtract
  from espnet.nets.pytorch_backend.nets_utils import make_pad_mask
label_desc: Use image node_id 6 for calling the SyllableScoreFeats obj's underlying member method code with example usage: obj.forward(label, label_lengths, midi, midi_lengths, duration, duration_lengths) and returns: seg_label,  seg_label_lengths,  seg_midi,  seg_midi_lengths,  seg_duration,  seg_duration_lengths