class_docstr: STFT encoder for speech enhancement and separation
docstr: Forward.
  
  Args:
      input (torch.Tensor): mixed speech [Batch, sample]
      ilens (torch.Tensor): input lengths [Batch]
      fs (int): sampling rate in Hz
          If not None, reconfigure STFT window and hop lengths for a new
          sampling rate while keeping their duration fixed.
  Returns:
      spectrum (ComplexTensor): [Batch, T, (C,) F]
      flens (torch.Tensor): [Batch]
docstr_tok: ["Forward",".","Args",":","input","(","torch.Tensor",")",":","mixed","speech","[","Batch",",","sample","]","ilens","(","torch.Tensor",")",":","input","lengths","[","Batch","]","fs","(","int",")",":","sampling","rate","in","Hz","If","not","None",",","reconfigure","STFT","window","and","hop","lengths","for","a","new","sampling","rate","while","keeping","their","duration","fixed",".","Returns",":","spectrum","(","ComplexTensor",")",":","[","Batch",",","T",",","(","C",",",")","F","]","flens","(","torch.Tensor",")",":","[","Batch","]"]
code: def forward(
      self, input: torch.Tensor, ilens: torch.Tensor, fs: int = None
  ):
      """Forward.
  
      Args:
          input (torch.Tensor): mixed speech [Batch, sample]
          ilens (torch.Tensor): input lengths [Batch]
          fs (int): sampling rate in Hz
              If not None, reconfigure STFT window and hop lengths for a new
              sampling rate while keeping their duration fixed.
      Returns:
          spectrum (ComplexTensor): [Batch, T, (C,) F]
          flens (torch.Tensor): [Batch]
      """
      if fs is not None:
          self._reconfig_for_fs(fs)
      # for supporting half-precision training
      if input.dtype in (torch.float16, torch.bfloat16):
          spectrum, flens = self.stft(input.float(), ilens)
          spectrum = spectrum.to(dtype=input.dtype)
      else:
          spectrum, flens = self.stft(input, ilens)
      if is_torch_1_9_plus and self.use_builtin_complex:
          spectrum = torch.complex(spectrum[..., 0], spectrum[..., 1])
      else:
          spectrum = ComplexTensor(spectrum[..., 0], spectrum[..., 1])
  
      self._reset_config()
  
      spectrum = self.spec_transform_func(spectrum)
  
      return spectrum, flens
  
file_path: espnet/espnet2/enh/encoder/stft_encoder.py
imports: import torch
  from packaging.version import parse
  from torch_complex.tensor import ComplexTensor
  from espnet2.enh.encoder.abs_encoder import AbsEncoder
  from espnet2.layers.stft import Stft
label_desc: Use image node_id 4 for calling the STFTEncoder obj's underlying member method code with example usage: obj.forward(input, ilens, fs) and returns: spectrum,  flens