class_docstr: This class is taken from the original WHAMR! scripts.
  The original script can be found in
  http://wham.whisper.ai/
  
  This class is used to simulate the room-impulse-responses (RIRs) in the WHAMR dataset.
class_docstr_tok: ["This","class","is","taken","from","the","original","WHAMR","!","scripts",".","The","original","script","can","be","found","in","http",":","\/\/wham.whisper.ai\/","This","class","is","used","to","simulate","the","room-impulse-responses","(","RIRs",")","in","the","WHAMR","dataset","."]
code: def generate_audio(self, anechoic=False, fs=16000):
      if not self.rir:
          self.generate_rirs()
      if anechoic:
          self.rir = self.rir_anechoic
      else:
          self.rir = self.rir_reverberant
      audio_array = self.simulate(
          return_premix=True, recompute_rir=False
      )
  
      if type(fs) is not list:
          fs_array = [fs]
      else:
          fs_array = fs
      audio_out = []
      for elem in fs_array:
          if type(elem) is str:
              elem = int(elem.replace("k", "000"))
          if elem != self.fs:
              assert self.fs % elem == 0
              audio_out.append(
                  resample_poly(audio_array, elem, self.fs, axis=2)
              )
          else:
              audio_out.append(audio_array)
      if type(fs) is not list:
          return audio_out[
              0
          ]  # array of shape (n_sources, n_mics, n_samples)
      else:
          return audio_out
  
file_path: speechbrain/recipes/WHAMandWHAMR/separation/wham_room.py
imports: import numpy
  import pyroomacoustics
  from pyroomacoustics.parameters import constants
  from scipy.signal import resample_poly
label_desc: Use image node_id 5 for calling the WhamRoom obj's underlying member method code with example usage: obj.generate_audio(anechoic, fs) and returns: audio_out, audio_out