class_docstr: Music dataset is an AudioDataset with music-related metadata.
  
  Args:
      info_fields_required (bool): Whether to enforce having required fields.
      merge_text_p (float): Probability of merging additional metadata to the description.
      drop_desc_p (float): Probability of dropping the original description on text merge.
      drop_other_p (float): Probability of dropping the other fields used for text augmentation.
      joint_embed_attributes (list[str]): A list of attributes for which joint embedding metadata is returned.
      paraphrase_source (str, optional): Path to the .json or .json.gz file containing the
          paraphrases for the description. The json should be a dict with keys are the
          original info path (e.g. track_path.json) and each value is a list of possible
          paraphrased.
      paraphrase_p (float): probability of taking a paraphrase.
  
  See `audiocraft.data.info_audio_dataset.InfoAudioDataset` for full initialization arguments.
class_docstr_tok: ["Music","dataset","is","an","AudioDataset","with","music-related","metadata",".","Args",":","info_fields_required","(","bool",")",":","Whether","to","enforce","having","required","fields",".","merge_text_p","(","float",")",":","Probability","of","merging","additional","metadata","to","the","description",".","drop_desc_p","(","float",")",":","Probability","of","dropping","the","original","description","on","text","merge",".","drop_other_p","(","float",")",":","Probability","of","dropping","the","other","fields","used","for","text","augmentation",".","joint_embed_attributes","(","list","[","str","]",")",":","A","list","of","attributes","for","which","joint","embedding","metadata","is","returned",".","paraphrase_source","(","str",",","optional",")",":","Path","to","the",".json","or",".json.gz","file","containing","the","paraphrases","for","the","description",".","The","json","should","be","a","dict","with","keys","are","the","original","info","path","(","e.g",".","track_path.json",")","and","each","value","is","a","list","of","possible","paraphrased",".","paraphrase_p","(","float",")",":","probability","of","taking","a","paraphrase",".","See","`","audiocraft.data.info_audio_dataset.InfoAudioDataset","`","for","full","initialization","arguments","."]
code: def __init__(
      self,
      *args,
      info_fields_required: bool = True,
      merge_text_p: float = 0.0,
      drop_desc_p: float = 0.0,
      drop_other_p: float = 0.0,
      joint_embed_attributes: tp.List[str] = [],
      paraphrase_source: tp.Optional[str] = None,
      paraphrase_p: float = 0,
      **kwargs,
  ):
      kwargs[
          "return_info"
      ] = True  # We require the info for each song of the dataset.
      super().__init__(*args, **kwargs)
      self.info_fields_required = info_fields_required
      self.merge_text_p = merge_text_p
      self.drop_desc_p = drop_desc_p
      self.drop_other_p = drop_other_p
      self.joint_embed_attributes = joint_embed_attributes
      self.paraphraser = None
      if paraphrase_source is not None:
          self.paraphraser = Paraphraser(
              paraphrase_source, paraphrase_p
          )
  
imports: from dataclasses import dataclass, field, fields, replace
  import gzip
  import json
  import logging
  from pathlib import Path
  import random
  import typing
  import torch
  from .info_audio_dataset import InfoAudioDataset, AudioInfo, get_keyword_list, get_keyword, get_string
  from ..modules.conditioners import ConditioningAttributes, JointEmbedCondition, WavCondition
  from ..utils.utils import warn_once
label_desc: Use image node_id 1 to create a new MusicDataset object from inherited base classes: InfoAudioDataset with example: obj = MusicDataset()