code: def compute_pitch():
      parser = get_parser()
      args = parser.parse_args()
  
      config = {}
      config["sample_rate"] = int(args.sample_rate)
      config["window_length"] = args.window_length
      config["frame_length"] = args.frame_length
      config["snip_edges"] = args.snip_edges
      config["preemph_coeff"] = args.preemph_coeff
      config["min_f0"] = args.min_f0
      config["max_f0"] = args.max_f0
      config["soft_min_f0"] = args.soft_min_f0
      config["penalty_factor"] = args.penalty_factor
      config["lowpass_cutoff"] = args.lowpass_cutoff
      config["resample_freq"] = args.resample_freq
      config["delta_pitch"] = args.delta_pitch
      config["nccf_ballast"] = args.nccf_ballast
      config["lowpass_filter_width"] = args.lowpass_filter_width
      config["upsample_filter_width"] = args.upsample_filter_width
      config["max_frames_latency"] = args.max_frames_latency
      config["frames_per_chunk"] = args.frames_per_chunk
      config[
          "simulate_first_pass_online"
      ] = args.simulate_first_pass_online
      config["recompute_frame"] = args.recompute_frame
      config["nccf_ballast_online"] = args.nccf_ballast_online
  
      pitch = Pitch.params(config).instantiate()
  
      with kaldiio.ReadHelper(
          args.rspecifier, segments=args.segments
      ) as reader, KaldiWriter(
          args.wspecifier,
          write_num_frames=args.write_num_frames,
          compress=args.compress,
          compression_method=args.compression_method,
      ) as writer:
          for utt_id, (sample_rate, array) in reader:
              if sample_rate != args.sample_rate:
                  args.sample_rate = sample_rate
              array = array.astype(np.float32)
              audio_data = tf.constant(array, dtype=tf.float32)
              pitch_test = tf.squeeze(
                  pitch(audio_data, args.sample_rate)
              )
              sess = tf.Session()
              pitch_feats = pitch_test.eval(session=sess)
              writer[utt_id] = pitch_feats
  
file_path: delta/egs/snli/match/v1/utils/speech/compute_pitch_feats.py
imports: import delta.compat
  import argparse
  from distutils.util import strtobool
  import kaldiio
  import numpy
  import os
  from delta.data.frontend.pitch import Pitch
  from espnet.utils.cli_writers import KaldiWriter
label_desc: Use image node_id 2 for calling a global function with example usage: compute_pitch() without return types