code: def extract_audio_to_file(
      video_path: str, output_audio_path: str
  ) -> None:
      audio_info = get_audio_info(video_path)
      sample_rate = str(audio_info["sample_rate"])
      codec = audio_info["codec_name"]
  
      if os.path.splitext(output_audio_path)[-1] == ".aac":
          (
              ffmpeg.input(video_path, loglevel="quiet")
              .output(output_audio_path, acodec=codec, ac=1)
              .overwrite_output()
              .run(cmd=FFMPEG_PATH)
          )
      else:
          out, err = (
              ffmpeg.input(video_path, loglevel="quiet")
              .output(
                  "-",
                  format="f32le",
                  acodec="pcm_f32le",
                  ac=1,
                  ar=sample_rate,
              )
              .run(
                  cmd=FFMPEG_PATH,
                  capture_stdout=True,
                  capture_stderr=True,
              )
          )
          audio = np.frombuffer(out, np.float32)
          audutils.ret_and_save_audio(
              audio, output_audio_path, int(sample_rate)
          )
  
imports: import math
  import os
  import shutil
  import tempfile
  from typing import Any, Dict, List, Optional
  import ffmpeg
  import numpy
  from augly.audio import utils
  from augly.utils import pathmgr, SILENT_AUDIO_PATH
  from augly.utils.ffmpeg import FFMPEG_PATH, FFPROBE_PATH
  from vidgear.gears import WriteGear
label_desc: Use image node_id 3 for calling a global function with example usage: extract_audio_to_file(video_path, output_audio_path) without return types