code: def rvad(speechproc, data, fs):
      # TODO(jiatong): add arguments to params
      winlen, ovrlen, pre_coef, nfilter, nftt = (
          0.025,
          0.01,
          0.97,
          20,
          512,
      )
      ftThres = 0.5
      vadThres = 0.4
      opts = 1
  
      assert fs == 16_000, "sample rate must be 16khz"
      ft, flen, fsh10, nfr10 = speechproc.sflux(
          data, fs, winlen, ovrlen, nftt
      )
  
      # --spectral flatness --
      pv01 = np.zeros(ft.shape[0])
      pv01[np.less_equal(ft, ftThres)] = 1
      pitch = deepcopy(ft)
  
      pvblk = speechproc.pitchblockdetect(pv01, pitch, nfr10, opts)
  
      # --filtering--
      ENERGYFLOOR = np.exp(-50)
      b = np.array([0.9770, -0.9770])
      a = np.array([1.0000, -0.9540])
      fdata = lfilter(b, a, data, axis=0)
  
      # --pass 1--
      noise_samp, noise_seg, n_noise_samp = speechproc.snre_highenergy(
          fdata, nfr10, flen, fsh10, ENERGYFLOOR, pv01, pvblk
      )
  
      # sets noisy segments to zero
      for j in range(n_noise_samp):
          fdata[
              range(int(noise_samp[j, 0]), int(noise_samp[j, 1]) + 1)
          ] = 0
  
      vad_seg = speechproc.snre_vad(
          fdata, nfr10, flen, fsh10, ENERGYFLOOR, pv01, pvblk, vadThres
      )
      return vad_seg, data
  
file_path: espnet/egs2/aishell4/enh1/pyscripts/audio/compute_vad.py
imports: import argparse
  import logging
  import sys
  from copy import deepcopy
  from io import BytesIO
  from pathlib import Path
  from typing import Optional, Tuple
  import kaldiio
  import numpy
  import resampy
  import soundfile
  import soundfile
  from scipy.signal import lfilter
  from tqdm import tqdm
  from typeguard import check_argument_types
  from espnet2.fileio.read_text import read_2columns_text
  from espnet.utils.cli_utils import get_commandline_args
label_desc: Use image node_id 1 for calling a global function with example usage: rvad(speechproc, data, fs) and returns: vad_seg,  data