code: def get_pitch_contour(
      wav,
      pitch_mean=None,
      pitch_std=None,
      compute_mean_std=False,
      sample_rate=22050,
  ):
      f0, _, _ = librosa.pyin(
          wav.numpy(),
          fmin=librosa.note_to_hz("C2"),
          fmax=librosa.note_to_hz("C7"),
          frame_length=1024,
          hop_length=256,
          sr=sample_rate,
          center=True,
          fill_na=0.0,
      )
      pitch_contour = torch.tensor(f0, dtype=torch.float32)
      _pitch_mean = pitch_contour.mean().item()
      _pitch_std = pitch_contour.std().item()
      if compute_mean_std:
          pitch_mean = _pitch_mean
          pitch_std = _pitch_std
      if (pitch_mean is not None) and (pitch_std is not None):
          pitch_contour = pitch_contour - pitch_mean
          pitch_contour[pitch_contour == -pitch_mean] = 0.0
          pitch_contour = pitch_contour / pitch_std
  
      return pitch_contour
  
file_path: NeMo/scripts/ssl_tts/ssl_tts_vc.py
imports: import argparse
  import os
  import librosa
  import soundfile
  import torch
  from nemo.collections.asr.parts.preprocessing.features import WaveformFeaturizer
  from nemo.collections.tts.models import fastpitch_ssl, hifigan, ssl_tts
  from nemo.collections.tts.parts.utils.tts_dataset_utils import get_base_dir
label_desc: Use image node_id 2 for calling a global function with example usage: get_pitch_contour(wav, pitch_mean, pitch_std, compute_mean_std, sample_rate) and returns: pitch_contour