code: def main():
      parser = get_parser()
      args = parser.parse_args()
  
      logfmt = "%(asctime)s (%(module)s:%(lineno)d) %(levelname)s: %(message)s"
      if args.verbose > 0:
          logging.basicConfig(level=logging.INFO, format=logfmt)
      else:
          logging.basicConfig(level=logging.WARN, format=logfmt)
      logging.info(get_commandline_args())
  
      with kaldiio.ReadHelper(
          args.rspecifier, segments=args.segments
      ) as reader, file_writer_helper(
          args.wspecifier,
          filetype=args.filetype,
          write_num_frames=args.write_num_frames,
          compress=args.compress,
          compression_method=args.compression_method,
      ) as writer:
          for utt_id, (rate, array) in reader:
              array = array.astype(numpy.float32)
              if args.fs is not None and rate != args.fs:
                  array = resampy.resample(array, rate, args.fs, axis=0)
              if args.normalize is not None and args.normalize != 1:
                  array = array / (1 << (args.normalize - 1))
              spc = spectrogram(
                  x=array,
                  n_fft=args.n_fft,
                  n_shift=args.n_shift,
                  win_length=args.win_length,
                  window=args.window,
              )
              writer[utt_id] = spc
  
file_path: espnet/utils/compute-stft-feats.py
imports: import argparse
  import logging
  from distutils.util import strtobool
  import kaldiio
  import numpy
  import resampy
  from espnet2.utils.types import int_or_none
  from espnet.transform.spectrogram import spectrogram
  from espnet.utils.cli_utils import get_commandline_args
  from espnet.utils.cli_writers import file_writer_helper
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types