class_docstr: F0 estimation with dio + stonemask algorithm.
  
  This is f0 extractor based on dio + stonmask algorithm introduced in `WORLD:
  a vocoder-based high-quality speech synthesis system for real-time applications`_.
  
  .. _`WORLD: a vocoder-based high-quality speech synthesis system for real-time
      applications`: https://doi.org/10.1587/transinf.2015EDP7457
  
  Note:
      This module is based on NumPy implementation. Therefore, the computational graph
      is not connected.
  
  Todo:
      Replace this module with PyTorch-based implementation.
class_docstr_tok: ["F0","estimation","with","dio","+","stonemask","algorithm",".","This","is","f0","extractor","based","on","dio","+","stonmask","algorithm","introduced","in","`","WORLD",":","a","vocoder-based","high-quality","speech","synthesis","system","for","real-time","applications","`","_",".","..","_","`","WORLD",":","a","vocoder-based","high-quality","speech","synthesis","system","for","real-time","applications","`",":","https",":","\/\/doi.org\/10.1587\/transinf.2015EDP7457","Note",":","This","module","is","based","on","NumPy","implementation",".","Therefore",",","the","computational","graph","is","not","connected",".","Todo",":","Replace","this","module","with","PyTorch-based","implementation","."]
code: def __init__(
      self,
      fs: Union[int, str] = 22050,
      n_fft: int = 1024,
      hop_length: int = 256,
      f0min: int = 80,
      f0max: int = 400,
      use_token_averaged_f0: bool = True,
      use_continuous_f0: bool = True,
      use_log_f0: bool = True,
      reduction_factor: int = None,
  ):
      assert check_argument_types()
      super().__init__()
      if isinstance(fs, str):
          fs = humanfriendly.parse_size(fs)
      self.fs = fs
      self.n_fft = n_fft
      self.hop_length = hop_length
      self.frame_period = 1000 * hop_length / fs
      self.f0min = f0min
      self.f0max = f0max
      self.use_token_averaged_f0 = use_token_averaged_f0
      self.use_continuous_f0 = use_continuous_f0
      self.use_log_f0 = use_log_f0
      if use_token_averaged_f0:
          assert reduction_factor >= 1
      self.reduction_factor = reduction_factor
  
imports: import logging
  from typing import Any, Dict, Tuple, Union
  import humanfriendly
  import numpy
  import pyworld
  import torch
  import torch.nn.functional
  from scipy.interpolate import interp1d
  from typeguard import check_argument_types
  from espnet2.tts.feats_extract.abs_feats_extract import AbsFeatsExtract
  from espnet.nets.pytorch_backend.nets_utils import pad_list
label_desc: Use image node_id 1 to create a new Dio object from inherited base classes: AbsFeatsExtract with example: obj = Dio(fs, n_fft, hop_length, f0min, f0max, use_token_averaged_f0, use_continuous_f0, use_log_f0, reduction_factor)