class_docstr: Streaming implementation for Demucs. It supports being fed with any amount
  of audio at a time. You will get back as much audio as possible at that
  point.
  
  Args:
      - demucs (Demucs): Demucs model.
      - dry (float): amount of dry (e.g. input) signal to keep. 0 is maximum
          noise removal, 1 just returns the input signal. Small values > 0
          allows to limit distortions.
      - num_frames (int): number of frames to process at once. Higher values
          will increase overall latency but improve the real time factor.
      - resample_lookahead (int): extra lookahead used for the resampling.
      - resample_buffer (int): size of the buffer of previous inputs/outputs
          kept for resampling.
class_docstr_tok: ["Streaming","implementation","for","Demucs",".","It","supports","being","fed","with","any","amount","of","audio","at","a","time",".","You","will","get","back","as","much","audio","as","possible","at","that","point",".","Args",":","-","demucs","(","Demucs",")",":","Demucs","model",".","-","dry","(","float",")",":","amount","of","dry","(","e.g",".","input",")","signal","to","keep",".","0","is","maximum","noise","removal",",","1","just","returns","the","input","signal",".","Small","values",">","0","allows","to","limit","distortions",".","-","num_frames","(","int",")",":","number","of","frames","to","process","at","once",".","Higher","values","will","increase","overall","latency","but","improve","the","real","time","factor",".","-","resample_lookahead","(","int",")",":","extra","lookahead","used","for","the","resampling",".","-","resample_buffer","(","int",")",":","size","of","the","buffer","of","previous","inputs\/outputs","kept","for","resampling","."]
docstr: Apply the model to mix using true real time evaluation.
  Normalization is done online as is the resampling.
docstr_tok: ["Apply","the","model","to","mix","using","true","real","time","evaluation",".","Normalization","is","done","online","as","is","the","resampling","."]
code: def feed(self, wav):
      """
      Apply the model to mix using true real time evaluation.
      Normalization is done online as is the resampling.
      """
      begin = time.time()
      demucs = self.demucs
      resample_buffer = self.resample_buffer
      stride = self.stride
      resample = demucs.resample
  
      if wav.dim() != 2:
          raise ValueError("input wav should be two dimensional.")
      chin, _ = wav.shape
      if chin != demucs.chin:
          raise ValueError(
              f"Expected {demucs.chin} channels, got {chin}"
          )
  
      self.pending = th.cat([self.pending, wav], dim=1)
      outs = []
      while self.pending.shape[1] >= self.total_length:
          self.frames += 1
          frame = self.pending[:, : self.total_length]
          dry_signal = frame[:, :stride]
          if demucs.normalize:
              mono = frame.mean(0)
              variance = (mono**2).mean()
              self.variance = (
                  variance / self.frames
                  + (1 - 1 / self.frames) * self.variance
              )
              frame = frame / (demucs.floor + math.sqrt(self.variance))
          frame = th.cat([self.resample_in, frame], dim=-1)
          self.resample_in[:] = frame[
              :, stride - resample_buffer : stride
          ]
  
          if resample == 4:
              frame = upsample2(upsample2(frame))
          elif resample == 2:
              frame = upsample2(frame)
          # remove pre sampling buffer
          frame = frame[:, resample * resample_buffer :]
          # remove extra samples after window
          frame = frame[:, : resample * self.frame_length]
  
          out, extra = self._separate_frame(frame)
          padded_out = th.cat([self.resample_out, out, extra], 1)
          self.resample_out[:] = out[:, -resample_buffer:]
          if resample == 4:
              out = downsample2(downsample2(padded_out))
          elif resample == 2:
              out = downsample2(padded_out)
          else:
              out = padded_out
  
          out = out[:, resample_buffer // resample :]
          out = out[:, :stride]
  
          if demucs.normalize:
              out *= math.sqrt(self.variance)
          out = self.dry * dry_signal + (1 - self.dry) * out
          outs.append(out)
          self.pending = self.pending[:, stride:]
  
      self.total_time += time.time() - begin
      if outs:
          out = th.cat(outs, 1)
      else:
          out = th.zeros(chin, 0, device=wav.device)
      return out
  
imports: import math
  import time
  import torch
  from torch import nn
  from torch.nn import functional
  from .resample import downsample2, upsample2
  from .utils import capture_init
label_desc: Use image node_id 5 for calling the DemucsStreamer obj's underlying member method code with example usage: obj.feed(wav) and returns: out