class_docstr: Problem spec for Librispeech using clean and noisy data.
code: def generator(
      self,
      data_dir,
      tmp_dir,
      datasets,
      eos_list=None,
      start_from=0,
      how_many=0,
  ):
      del eos_list
      i = 0
      for url, subdir in datasets:
          filename = os.path.basename(url)
          compressed_file = generator_utils.maybe_download(
              tmp_dir, filename, url
          )
  
          read_type = "r:gz" if filename.endswith("tgz") else "r"
          with tarfile.open(compressed_file, read_type) as corpus_tar:
              # Create a subset of files that don't already exist.
              #   tarfile.extractall errors when encountering an existing file
              #   and tarfile.extract is extremely slow
              members = []
              for f in corpus_tar:
                  if not os.path.isfile(os.path.join(tmp_dir, f.name)):
                      members.append(f)
              corpus_tar.extractall(tmp_dir, members=members)
  
          raw_data_dir = os.path.join(tmp_dir, "LibriSpeech", subdir)
          data_files = _collect_data(raw_data_dir, "flac", "txt")
          data_pairs = data_files.values()
  
          encoders = self.feature_encoders(data_dir)
          audio_encoder = encoders["waveforms"]
          text_encoder = encoders["targets"]
  
          for utt_id, media_file, text_data in sorted(data_pairs)[
              start_from:
          ]:
              if how_many > 0 and i == how_many:
                  return
              i += 1
              wav_data = audio_encoder.encode(media_file)
              spk_id, unused_book_id, _ = utt_id.split("-")
              yield {
                  "waveforms": wav_data,
                  "waveform_lens": [len(wav_data)],
                  "targets": text_encoder.encode(text_data),
                  "raw_transcript": [text_data],
                  "utt_id": [utt_id],
                  "spk_id": [spk_id],
              }
  
imports: import os
  import tarfile
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import speech_recognition
  from tensor2tensor.utils import registry
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 6 for calling the Librispeech obj's underlying member method code with example usage: obj.generator(data_dir, tmp_dir, datasets, eos_list, start_from, how_many) without return types