class_docstr: SeparateSpeechStreaming class. Separate a small audio chunk in streaming.
  
  Examples:
      >>> import soundfile
      >>> separate_speech = SeparateSpeechStreaming("enh_config.yml", "enh.pth")
      >>> audio, rate = soundfile.read("speech.wav")
      >>> lengths = torch.LongTensor(audio.shape[-1])
      >>> speech_sim_chunks = separate_speech.frame(wav)
      >>> output_chunks = [[] for ii in range(separate_speech.num_spk)]
      >>>
      >>> for chunk in speech_sim_chunks:
      >>>     output = separate_speech(chunk)
      >>>     for spk in range(separate_speech.num_spk):
      >>>         output_chunks[spk].append(output[spk])
      >>>
      >>> separate_speech.reset()
      >>> waves = [
      >>>     separate_speech.merge(chunks, length)
      >>>     for chunks in output_chunks ]
class_docstr_tok: ["SeparateSpeechStreaming","class",".","Separate","a","small","audio","chunk","in","streaming",".","Examples",":",">",">",">","import","soundfile",">",">",">","separate_speech","=","SeparateSpeechStreaming","(","``","enh_config.yml","''",",","``","enh.pth","''",")",">",">",">","audio",",","rate","=","soundfile.read","(","``","speech.wav","''",")",">",">",">","lengths","=","torch.LongTensor","(","audio.shape","[","-1","]",")",">",">",">","speech_sim_chunks","=","separate_speech.frame","(","wav",")",">",">",">","output_chunks","=","[","[","]","for","ii","in","range","(","separate_speech.num_spk",")","]",">",">",">",">",">",">","for","chunk","in","speech_sim_chunks",":",">",">",">","output","=","separate_speech","(","chunk",")",">",">",">","for","spk","in","range","(","separate_speech.num_spk",")",":",">",">",">","output_chunks","[","spk","]",".append","(","output","[","spk","]",")",">",">",">",">",">",">","separate_speech.reset","(",")",">",">",">","waves","=","[",">",">",">","separate_speech.merge","(","chunks",",","length",")",">",">",">","for","chunks","in","output_chunks","]"]
docstr: Inference
  
  Args:
      speech_mix: Input speech data (Batch, Nsamples [, Channels])
      fs: sample rate
  Returns:
      [separated_audio1, separated_audio2, ...]
docstr_tok: ["Inference","Args",":","speech_mix",":","Input","speech","data","(","Batch",",","Nsamples","[",",","Channels","]",")","fs",":","sample","rate","Returns",":","[","separated_audio1",",","separated_audio2",",","...","]"]
code: def __call__(
      self, speech_mix: Union[torch.Tensor, np.ndarray], fs: int = 8000
  ) -> List[torch.Tensor]:
      """Inference
  
      Args:
          speech_mix: Input speech data (Batch, Nsamples [, Channels])
          fs: sample rate
      Returns:
          [separated_audio1, separated_audio2, ...]
  
      """
      assert check_argument_types()
  
      # Input as audio signal
      if isinstance(speech_mix, np.ndarray):
          speech_mix = torch.as_tensor(speech_mix)
  
      assert speech_mix.dim() > 1, speech_mix.size()
      batch_size = speech_mix.size(0)
      speech_mix = speech_mix.to(getattr(torch, self.dtype))
  
      # a. To device
      speech_mix = to_device(speech_mix, device=self.device)
  
      # b. Enhancement/Separation Forward
      # frame_feature: (B, 1, F)
      frame_feature = self.enh_model.encoder.forward_streaming(
          speech_mix
      )
  
      # frame_separated: list of num_spk [(B, 1, F)]
      (
          frame_separated,
          self.streaming_states,
          _,
      ) = self.enh_model.separator.forward_streaming(
          frame_feature, self.streaming_states
      )
  
      # frame_separated: list of num_spk [(B, frame_size)]
      waves = [
          self.enh_model.decoder.forward_streaming(f)
          for f in frame_separated
      ]
  
      assert len(waves) == self.num_spk, (len(waves), self.num_spk)
      assert len(waves[0]) == batch_size, (len(waves[0]), batch_size)
  
      return waves
  
imports: import argparse
  import logging
  import math
  import sys
  from itertools import chain
  from pathlib import Path
  from typing import Any, List, Optional, Sequence, Tuple, Union
  import humanfriendly
  import numpy
  import torch
  import torch_complex
  import yaml
  from typeguard import check_argument_types
  from espnet2.bin.enh_inference import build_model_from_args_and_file, get_train_config, recursive_dict_update
  from espnet2.fileio.sound_scp import SoundScpWriter
  from espnet2.tasks.enh import EnhancementTask
  from espnet2.tasks.enh_s2t import EnhS2TTask
  from espnet2.torch_utils.device_funcs import to_device
  from espnet2.torch_utils.set_all_random_seed import set_all_random_seed
  from espnet2.train.abs_espnet_model import AbsESPnetModel
  from espnet2.utils import config_argparse
  from espnet2.utils.types import str2bool, str2triple_str, str_or_none
  from espnet.utils.cli_utils import get_commandline_args
label_desc: Use image node_id 5 for calling the SeparateSpeechStreaming obj's underlying member method code with example usage: obj.__call__(speech_mix, fs) and returns: waves