code: def test_stft_enc_dec_streaming(
      n_fft, win_length, hop_length, onesided
  ):
      input_audio = torch.randn((1, 16000))
      ilens = torch.LongTensor([16000])
  
      encoder = STFTEncoder(
          n_fft=n_fft,
          win_length=win_length,
          hop_length=hop_length,
          onesided=onesided,
      )
      decoder = STFTDecoder(
          n_fft=n_fft,
          win_length=win_length,
          hop_length=hop_length,
          onesided=onesided,
      )
      frames, flens = encoder(input_audio, ilens)
      wav, ilens = decoder(frames, ilens)
  
      splited = encoder.streaming_frame(input_audio)
  
      sframes = [encoder.forward_streaming(s) for s in splited]
      swavs = [decoder.forward_streaming(s) for s in sframes]
      merged = decoder.streaming_merge(swavs, ilens)
  
      if not (is_torch_1_9_plus and encoder.use_builtin_complex):
          sframes = torch_complex.cat(sframes, dim=1)
      else:
          sframes = torch.cat(sframes, dim=1)
  
      torch.testing.assert_close(sframes.real, frames.real)
      torch.testing.assert_close(sframes.imag, frames.imag)
      torch.testing.assert_close(wav, input_audio)
      torch.testing.assert_close(wav, merged)
  
file_path: espnet/test/espnet2/enh/decoder/test_stft_decoder.py
imports: import pytest
  import torch
  import torch_complex
  from packaging.version import parse
  from torch_complex import ComplexTensor
  from espnet2.enh.decoder.stft_decoder import STFTDecoder
  from espnet2.enh.encoder.stft_encoder import STFTEncoder
label_desc: Use image node_id 3 for calling a global function with example usage: test_stft_enc_dec_streaming(n_fft, win_length, hop_length, onesided) without return types