class_docstr: Apply filtering or resampling.
  
  Args:
      initial_sr (int): Initial sample rate.
      target_sr (int): Target sample rate.
      use_resampling: Whether to use resampling or not.
      use_filter (bool):
      n_bands (int): Number of bands to consider.
      idx_band (int):
      device (torch.device or str):
      cutoffs ():
      boost (bool):
class_docstr_tok: ["Apply","filtering","or","resampling",".","Args",":","initial_sr","(","int",")",":","Initial","sample","rate",".","target_sr","(","int",")",":","Target","sample","rate",".","use_resampling",":","Whether","to","use","resampling","or","not",".","use_filter","(","bool",")",":","n_bands","(","int",")",":","Number","of","bands","to","consider",".","idx_band","(","int",")",":","device","(","torch.device","or","str",")",":","cutoffs","(",")",":","boost","(","bool",")",":"]
docstr: Apply filtering or resampling
  Args:
      initial_sr (int): sample rate of the dataset
      target_sr (int): sample rate after resampling
      use_resampling (bool): whether or not performs resampling
      use_filter (bool): when True filter the data to keep only one frequency band
      n_bands (int): Number of bands used
      cuts (none or list): The cutoff frequencies of the band filtering
                          if None then we use mel scale bands.
      idx_band (int): index of the frequency band. 0 are lows ... (n_bands - 1) highs
      boost (bool): make the data scale match our music dataset.
docstr_tok: ["Apply","filtering","or","resampling","Args",":","initial_sr","(","int",")",":","sample","rate","of","the","dataset","target_sr","(","int",")",":","sample","rate","after","resampling","use_resampling","(","bool",")",":","whether","or","not","performs","resampling","use_filter","(","bool",")",":","when","True","filter","the","data","to","keep","only","one","frequency","band","n_bands","(","int",")",":","Number","of","bands","used","cuts","(","none","or","list",")",":","The","cutoff","frequencies","of","the","band","filtering","if","None","then","we","use","mel","scale","bands",".","idx_band","(","int",")",":","index","of","the","frequency","band",".","0","are","lows","...","(","n_bands","-","1",")","highs","boost","(","bool",")",":","make","the","data","scale","match","our","music","dataset","."]
code: def __init__(
      self,
      initial_sr: int = 24000,
      target_sr: int = 16000,
      use_resampling: bool = False,
      use_filter: bool = False,
      n_bands: int = 4,
      idx_band: int = 0,
      device: torch.device = torch.device("cpu"),
      cutoffs=None,
      boost=False,
  ):
      """Apply filtering or resampling
      Args:
          initial_sr (int): sample rate of the dataset
          target_sr (int): sample rate after resampling
          use_resampling (bool): whether or not performs resampling
          use_filter (bool): when True filter the data to keep only one frequency band
          n_bands (int): Number of bands used
          cuts (none or list): The cutoff frequencies of the band filtering
                              if None then we use mel scale bands.
          idx_band (int): index of the frequency band. 0 are lows ... (n_bands - 1) highs
          boost (bool): make the data scale match our music dataset.
      """
      assert idx_band < n_bands
      self.idx_band = idx_band
      if use_filter:
          if cutoffs is not None:
              self.filter = julius.SplitBands(
                  sample_rate=initial_sr, cutoffs=cutoffs
              ).to(device)
          else:
              self.filter = julius.SplitBands(
                  sample_rate=initial_sr, n_bands=n_bands
              ).to(device)
      self.use_filter = use_filter
      self.use_resampling = use_resampling
      self.target_sr = target_sr
      self.initial_sr = initial_sr
      self.boost = boost
  
imports: import typing
  import flashy
  import julius
  import omegaconf
  import torch
  import torch.nn.functional
  from .None import builders
  from .None import base
  from ..None import models
  from ..modules.diffusion_schedule import NoiseSchedule
  from ..metrics import RelativeVolumeMel
  from ..models.builders import get_processor
  from ..utils.samples.manager import SampleManager
  from ..solvers.compression import CompressionSolver
label_desc: Use image node_id 1 to create a new DataProcess object  with example: obj = DataProcess(initial_sr, target_sr, use_resampling, use_filter, n_bands, idx_band, device, cutoffs, boost)