class_docstr: GTZANMusicSpeech Dataset.
docstr: Yields examples.
  
  Args:
     path: Path of the downloaded and extracted directory
  
  Yields:
     Next examples
docstr_tok: ["Yields","examples",".","Args",":","path",":","Path","of","the","downloaded","and","extracted","directory","Yields",":","Next","examples"]
code: def _generate_examples(self, path):
      """Yields examples.
  
      Args:
         path: Path of the downloaded and extracted directory
  
      Yields:
         Next examples
      """
  
      #  The wav files are in directories named "{label}_wav"
      name_regex = re.compile(r"(.*)(speech|music)\_.*\/[\w-]*\.(wav)")
  
      for root, _, file_name in tf.io.gfile.walk(path):
          for fname in file_name:
              full_file_name = os.path.join(root, fname)
              res = name_regex.match(full_file_name)
              if not res:
                  continue
              label = res.group(2)
              key = fname
              example = {
                  "audio": full_file_name,
                  "label": label,
                  "audio/filename": fname,
              }
              yield key, example
  
file_path: datasets/tensorflow_datasets/audio/gtzan_music_speech/gtzan_music_speech.py
imports: import os
  import re
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the GTZANMusicSpeech obj's underlying member method code with example usage: obj._generate_examples(path) without return types