class_docstr: OnlineProcessor module definition.
  
  Args:
      feature_extractor: Feature extractor module.
      normalization_module: Normalization module.
      decoding_window: Size of the decoding window (in ms).
      encoder_sub_factor: Encoder subsampling factor.
      frontend_conf: Frontend configuration.
      device: Device to pin module tensors on.
      audio_sampling_rate: Input sampling rate.
docstr: Get samples for feature computation.
  
  Args:
      samples: Speech data. (S)
      is_final: Whether speech corresponds to the final chunk of data.
  
  Returns:
      samples: New speech data. (1, decoding_samples)
docstr_tok: ["Get","samples","for","feature","computation",".","Args",":","samples",":","Speech","data",".","(","S",")","is_final",":","Whether","speech","corresponds","to","the","final","chunk","of","data",".","Returns",":","samples",":","New","speech","data",".","(","1",",","decoding_samples",")"]
code: def get_current_samples(
      self, samples: torch.Tensor, is_final: bool
  ) -> torch.Tensor:
      """Get samples for feature computation.
  
      Args:
          samples: Speech data. (S)
          is_final: Whether speech corresponds to the final chunk of data.
  
      Returns:
          samples: New speech data. (1, decoding_samples)
  
      """
      if self.samples is not None:
          samples = torch.cat([self.samples, samples], dim=0)
  
      samples_sz = samples.size(0)
  
      if is_final:
          waveform_buffer = None
  
          if samples_sz < self.decoding_samples:
              samples = torch.nn.functional.pad(
                  samples,
                  (0, self.decoding_samples - samples_sz),
                  mode="constant",
                  value=0.0,
              )
      else:
          n_frames = (samples_sz - self.win_hop_sz) // self.hop_sz
          n_residual = (samples_sz - self.win_hop_sz) % self.hop_sz
  
          waveform_buffer = samples.narrow(
              0,
              samples_sz - self.win_hop_sz - n_residual,
              self.win_hop_sz + n_residual,
          )
  
          samples = samples.narrow(
              0, 0, self.win_hop_sz + n_frames * self.hop_sz
          )
  
      self.samples = waveform_buffer
  
      samples = samples.unsqueeze(0).to(device=self.device)
  
      self.samples_length.fill_(samples.size(1))
  
      return samples
  
imports: from typing import Dict, Tuple
  import torch
label_desc: Use image node_id 3 for calling the OnlineAudioProcessor obj's underlying member method code with example usage: obj.get_current_samples(samples, is_final) and returns: samples