class_docstr: Create a Dataset for Multilingual TEDx.
  Each item is a tuple of the form: waveform, sample_rate, source utterance,
  target utterance, speaker_id, utterance_id
code: def __init__(self, root: str, lang: str, split: str) -> None:
      assert split in self.SPLITS and lang in self.LANGPAIRS
      _root = Path(root) / f"{lang}" / "data" / split
      wav_root, txt_root = _root / "wav", _root / "txt"
      assert _root.is_dir() and wav_root.is_dir() and txt_root.is_dir()
      # Load audio segments
      try:
          import yaml
      except ImportError:
          print(
              "Please install PyYAML to load the Multilingual TEDx YAML files"
          )
      with open(txt_root / f"{split}.yaml") as f:
          segments = yaml.load(f, Loader=yaml.BaseLoader)
      # Load source and target utterances
      src, tgt = lang.split("-")
      for _lang in [src, tgt]:
          with open(txt_root / f"{split}.{_lang}") as f:
              utterances = [r.strip() for r in f]
          assert len(segments) == len(utterances)
          for i, u in enumerate(utterances):
              segments[i][_lang] = u
      # Gather info
      self.data = []
      for wav_filename, _seg_group in groupby(
          segments, lambda x: x["wav"]
      ):
          wav_filename = wav_filename.replace(".wav", ".flac")
          wav_path = wav_root / wav_filename
          sample_rate = sf.info(wav_path.as_posix()).samplerate
          seg_group = sorted(
              _seg_group, key=lambda x: float(x["offset"])
          )
          for i, segment in enumerate(seg_group):
              offset = int(float(segment["offset"]) * sample_rate)
              n_frames = int(float(segment["duration"]) * sample_rate)
              _id = f"{wav_path.stem}_{i}"
              self.data.append(
                  (
                      wav_path.as_posix(),
                      offset,
                      n_frames,
                      sample_rate,
                      segment[src],
                      segment[tgt],
                      segment["speaker_id"],
                      tgt,
                      _id,
                  )
              )
  
imports: import argparse
  import logging
  import os
  from pathlib import Path
  import shutil
  from itertools import groupby
  from tempfile import NamedTemporaryFile
  from typing import Tuple
  import pandas
  import soundfile
  from examples.speech_to_text.data_utils import create_zip, extract_fbank_features, filter_manifest_df, gen_config_yaml, gen_vocab, get_zip_manifest, load_df_from_tsv, save_df_to_tsv
  import torch
  from torch.utils.data import Dataset
  from tqdm import tqdm
  from fairseq.data.audio.audio_utils import get_waveform, convert_waveform
label_desc: Use image node_id 1 to create a new mTEDx object from inherited base classes: Dataset with example: obj = mTEDx(root, lang, split)