code: def active_rms(clean, noise, fs=16000, energy_thresh=-50):
      """Returns the clean and noise RMS of the noise calculated only in the active portions"""
      window_size = 100  # in ms
      window_samples = int(fs * window_size / 1000)
      sample_start = 0
      noise_active_segs = []
      clean_active_segs = []
  
      while sample_start < len(noise):
          sample_end = min(sample_start + window_samples, len(noise))
          noise_win = noise[sample_start:sample_end]
          clean_win = clean[sample_start:sample_end]
          noise_seg_rms = (noise_win**2).mean() ** 0.5
          # Considering frames with energy
          if noise_seg_rms > energy_thresh:
              noise_active_segs = np.append(
                  noise_active_segs, noise_win
              )
              clean_active_segs = np.append(
                  clean_active_segs, clean_win
              )
          sample_start += window_samples
  
      if len(noise_active_segs) != 0:
          noise_rms = (noise_active_segs**2).mean() ** 0.5
      else:
          noise_rms = EPS
  
      if len(clean_active_segs) != 0:
          clean_rms = (clean_active_segs**2).mean() ** 0.5
      else:
          clean_rms = EPS
  
      return clean_rms, noise_rms
  
file_path: speechbrain/recipes/DNS/noisyspeech_synthesizer/audiolib.py
imports: import os
  import numpy
  import soundfile
  import subprocess
  import glob
  import librosa
label_desc: Use image node_id 11 for calling a global function with example usage: active_rms(clean, noise, fs, energy_thresh) and returns: clean_rms,  noise_rms