class_docstr: Class for computing pitch features.
  
  Args:
      pitch_name: Optional directory name to save pitch features under.
          If None, then pitch will not be saved.
      voiced_mask_name: Optional directory name to save voiced mask under.
          If None, then voiced mask will not be saved.
      voiced_prob_name: Optional directory name to save voiced probabilities under.
          If None, then voiced probabilities will not be saved.
      sample_rate: Sample rate to use when loading audio.
      win_length: Audio frame length to use for pitch computation.
      hop_length: Audio hop length to use for pitch computation.
      pitch_fmin: Minimum pitch value to compute. Defaults to librosa.note_to_hz('C2') = 65.41 Hz.
      pitch_fmax: Maximum pitch value to compute. Defaults to librosa.note_to_hz('C7') = 2093.00 Hz.
          Setting this to a lower value will speed up computation, but may lose some pitch information.
      volume_norm: Whether to apply volume normalization to the audio.
      batch_seconds: Optional float, if provided then long audio files will have their pitch computed after
          splitting them into segments batch_seconds seconds long, to avoid running out of memory.
      batch_padding: If batch_seconds is provided, then this determines how many audio frames will be padded on
          both sides of each segment to ensure that the pitch values at the boundary are correct.
          If batch_seconds is not provided then this parameter is ignored.
class_docstr_tok: ["Class","for","computing","pitch","features",".","Args",":","pitch_name",":","Optional","directory","name","to","save","pitch","features","under",".","If","None",",","then","pitch","will","not","be","saved",".","voiced_mask_name",":","Optional","directory","name","to","save","voiced","mask","under",".","If","None",",","then","voiced","mask","will","not","be","saved",".","voiced_prob_name",":","Optional","directory","name","to","save","voiced","probabilities","under",".","If","None",",","then","voiced","probabilities","will","not","be","saved",".","sample_rate",":","Sample","rate","to","use","when","loading","audio",".","win_length",":","Audio","frame","length","to","use","for","pitch","computation",".","hop_length",":","Audio","hop","length","to","use","for","pitch","computation",".","pitch_fmin",":","Minimum","pitch","value","to","compute",".","Defaults","to","librosa.note_to_hz","(","'C2","'",")","=","65.41","Hz",".","pitch_fmax",":","Maximum","pitch","value","to","compute",".","Defaults","to","librosa.note_to_hz","(","'C7","'",")","=","2093.00","Hz",".","Setting","this","to","a","lower","value","will","speed","up","computation",",","but","may","lose","some","pitch","information",".","volume_norm",":","Whether","to","apply","volume","normalization","to","the","audio",".","batch_seconds",":","Optional","float",",","if","provided","then","long","audio","files","will","have","their","pitch","computed","after","splitting","them","into","segments","batch_seconds","seconds","long",",","to","avoid","running","out","of","memory",".","batch_padding",":","If","batch_seconds","is","provided",",","then","this","determines","how","many","audio","frames","will","be","padded","on","both","sides","of","each","segment","to","ensure","that","the","pitch","values","at","the","boundary","are","correct",".","If","batch_seconds","is","not","provided","then","this","parameter","is","ignored","."]
code: def save(
      self,
      manifest_entry: Dict[str, Any],
      audio_dir: Path,
      feature_dir: Path,
      overwrite: bool = True,
  ) -> None:
      if not overwrite and _features_exists(
          feature_names=[
              self.pitch_name,
              self.voiced_mask_name,
              self.voiced_prob_name,
          ],
          manifest_entry=manifest_entry,
          audio_dir=audio_dir,
          feature_dir=feature_dir,
      ):
          return
  
      pitch, voiced_mask, voiced_prob = self.compute_pitch(
          manifest_entry=manifest_entry, audio_dir=audio_dir
      )
      _save_feature(
          feature_name=self.pitch_name,
          features=pitch,
          manifest_entry=manifest_entry,
          audio_dir=audio_dir,
          feature_dir=feature_dir,
      )
      _save_feature(
          feature_name=self.voiced_mask_name,
          features=voiced_mask,
          manifest_entry=manifest_entry,
          audio_dir=audio_dir,
          feature_dir=feature_dir,
      )
      _save_feature(
          feature_name=self.voiced_prob_name,
          features=voiced_prob,
          manifest_entry=manifest_entry,
          audio_dir=audio_dir,
          feature_dir=feature_dir,
      )
  
imports: import math
  from abc import ABC, abstractmethod
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Tuple, Union
  import librosa
  import numpy
  import torch
  from torch import Tensor
  from nemo.collections.asr.modules import AudioToMelSpectrogramPreprocessor
  from nemo.collections.tts.parts.utils.tts_dataset_utils import get_audio_filepaths, normalize_volume, stack_tensors
  from nemo.utils.decorators import experimental
label_desc: Use image node_id 3 for calling the PitchFeaturizer obj's underlying member method code with example usage: obj.save(manifest_entry, audio_dir, feature_dir, overwrite) without return types