class_docstr: AddNoiseRIR OP test.
class_docstr_tok: ["AddNoiseRIR","OP","test","."]
code: def test_add_rir_noise_aecres(self):
      wav_path = str(Path(PACKAGE_OPS_DIR).joinpath("data/sm1_cln.wav"))
  
      # reset path of noise && rir
      data_path = str(Path(PACKAGE_OPS_DIR).joinpath("data")) + "/"
      noise_file = data_path + "noiselist_new.scp"
      change_file_path(data_path, "noiselist.scp", "noiselist_new.scp")
      rir_file = data_path + "rirlist_new.scp"
      change_file_path(data_path, "rirlist.scp", "rirlist_new.scp")
  
      with self.cached_session(use_gpu=False, force_gpu=False) as sess:
          read_wav = ReadWav.params().instantiate()
          input_data, sample_rate = read_wav(wav_path)
          config = {
              "if_add_noise": True,
              "noise_filelist": noise_file,
              "if_add_rir": True,
              "rir_filelist": rir_file,
          }
          add_rir_noise_aecres = Add_rir_noise_aecres.params(
              config
          ).instantiate()
          add_rir_noise_aecres_test = add_rir_noise_aecres(
              input_data, sample_rate
          )
          print("Clean Data:", input_data.eval())
          print("Noisy Data:", add_rir_noise_aecres_test.eval())
  
          new_noise_file = data_path + "sm1_cln_noisy.wav"
          write_wav = WriteWav.params().instantiate()
          writewav_op = write_wav(
              new_noise_file,
              add_rir_noise_aecres_test / 32768,
              sample_rate,
          )
          sess.run(writewav_op)
  
file_path: delta/delta/data/frontend/add_rir_noise_aecres_test.py
imports: import os
  from pathlib import Path
  import delta.compat
  from delta.data.frontend.read_wav import ReadWav
  from delta.data.frontend.write_wav import WriteWav
  from delta.data.frontend.add_rir_noise_aecres import Add_rir_noise_aecres
  from core.ops import PACKAGE_OPS_DIR
label_desc: Use image node_id 1 for calling the AddRirNoiseAecresTest obj's underlying member method code with example usage: obj.test_add_rir_noise_aecres() without return types