code: def audiowrite(
      destpath,
      audio,
      sample_rate=16000,
      norm=False,
      target_level=-25,
      clipping_threshold=0.99,
      clip_test=False,
  ):
      """Function to write audio"""
  
      if clip_test:
          if is_clipped(audio, clipping_threshold=clipping_threshold):
              raise ValueError(
                  "Clipping detected in audiowrite()! "
                  + destpath
                  + " file not written to disk."
              )
  
      if norm:
          audio = normalize(audio, target_level)
          max_amp = max(abs(audio))
          if max_amp >= clipping_threshold:
              audio = audio / max_amp * (clipping_threshold - EPS)
  
      destpath = os.path.abspath(destpath)
      destdir = os.path.dirname(destpath)
  
      if not os.path.exists(destdir):
          os.makedirs(destdir)
  
      sf.write(destpath, audio, sample_rate)
      return
  
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 5 for calling a global function with example usage: audiowrite(destpath, audio, sample_rate, norm, target_level, clipping_threshold, clip_test) without return types