code: def world_extract(
      x: np.ndarray,
      fs: int,
      f0min: int = 40,
      f0max: int = 800,
      n_fft: int = 512,
      n_shift: int = 256,
      mcep_dim: int = 25,
      mcep_alpha: float = 0.41,
  ) -> np.ndarray:
      """Extract World-based acoustic features.
  
      Args:
          x (ndarray): 1D waveform array.
          fs (int): Minimum f0 value (default=40).
          f0 (int): Maximum f0 value (default=800).
          n_shift (int): Shift length in point (default=256).
          n_fft (int): FFT length in point (default=512).
          n_shift (int): Shift length in point (default=256).
          mcep_dim (int): Dimension of mel-cepstrum (default=25).
          mcep_alpha (float): All pass filter coefficient (default=0.41).
  
      Returns:
          ndarray: Mel-cepstrum with the size (N, n_fft).
          ndarray: F0 sequence (N,).
  
      """
      # extract features
      x = x.astype(np.float64)
      f0, time_axis = pw.harvest(
          x,
          fs,
          f0_floor=f0min,
          f0_ceil=f0max,
          frame_period=n_shift / fs * 1000,
      )
      sp = pw.cheaptrick(x, f0, time_axis, fs, fft_size=n_fft)
      if mcep_dim is None or mcep_alpha is None:
          mcep_dim, mcep_alpha = _get_best_mcep_params(fs)
      mcep = pysptk.sp2mc(sp, mcep_dim, mcep_alpha)
  
      return mcep, f0
  
file_path: espnet/egs2/magicdata/asr1/pyscripts/utils/evaluate_f0.py
imports: import argparse
  import fnmatch
  import logging
  import multiprocessing
  import os
  from typing import Dict, List, Tuple
  import librosa
  import numpy
  import pysptk
  import pyworld
  import soundfile
  from fastdtw import fastdtw
  from scipy import spatial
label_desc: Use image node_id 2 for calling a global function with example usage: world_extract(x, fs, f0min, f0max, n_fft, n_shift, mcep_dim, mcep_alpha) and returns: mcep,  f0