class_docstr: *Tedlium* :cite:`rousseau2012tedlium` dataset (releases 1,2 and 3).
  
  Args:
      root (str or Path): Path to the directory where the dataset is found or downloaded.
      release (str, optional): Release version.
          Allowed values are ``"release1"``, ``"release2"`` or ``"release3"``.
          (default: ``"release1"``).
      subset (str, optional): The subset of dataset to use. Valid options are ``"train"``, ``"dev"``,
          and ``"test"``. Defaults to ``"train"``.
      download (bool, optional):
          Whether to download the dataset if it is not found at root path. (default: ``False``).
      audio_ext (str, optional): extension for audio file (default: ``".sph"``)
code: def __init__(
      self,
      root: Union[str, Path],
      release: str = "release1",
      subset: str = "train",
      download: bool = False,
      audio_ext: str = ".sph",
  ) -> None:
      self._ext_audio = audio_ext
      if release in _RELEASE_CONFIGS.keys():
          folder_in_archive = _RELEASE_CONFIGS[release][
              "folder_in_archive"
          ]
          url = _RELEASE_CONFIGS[release]["url"]
          subset = (
              subset if subset else _RELEASE_CONFIGS[release]["subset"]
          )
      else:
          # Raise warning
          raise RuntimeError(
              "The release {} does not match any of the supported tedlium releases{} ".format(
                  release,
                  _RELEASE_CONFIGS.keys(),
              )
          )
      if subset not in _RELEASE_CONFIGS[release]["supported_subsets"]:
          # Raise warning
          raise RuntimeError(
              "The subset {} does not match any of the supported tedlium subsets{} ".format(
                  subset,
                  _RELEASE_CONFIGS[release]["supported_subsets"],
              )
          )
  
      # Get string representation of 'root' in case Path object is passed
      root = os.fspath(root)
  
      basename = os.path.basename(url)
      archive = os.path.join(root, basename)
  
      basename = basename.split(".")[0]
  
      if release == "release3":
          if subset == "train":
              self._path = os.path.join(
                  root,
                  folder_in_archive,
                  _RELEASE_CONFIGS[release]["data_path"],
              )
          else:
              self._path = os.path.join(
                  root, folder_in_archive, "legacy", subset
              )
      else:
          self._path = os.path.join(
              root,
              folder_in_archive,
              _RELEASE_CONFIGS[release]["data_path"],
              subset,
          )
  
      if download:
          if not os.path.isdir(self._path):
              if not os.path.isfile(archive):
                  checksum = _RELEASE_CONFIGS[release]["checksum"]
                  download_url_to_file(
                      url, archive, hash_prefix=checksum
                  )
              _extract_tar(archive)
      else:
          if not os.path.exists(self._path):
              raise RuntimeError(
                  f"The path {self._path} doesn't exist. "
                  "Please check the ``root`` path or set `download=True` to download it"
              )
  
      # Create list for all samples
      self._filelist = []
      stm_path = os.path.join(self._path, "stm")
      for file in sorted(os.listdir(stm_path)):
          if file.endswith(".stm"):
              stm_path = os.path.join(self._path, "stm", file)
              with open(stm_path) as f:
                  l = len(f.readlines())
                  file = file.replace(".stm", "")
                  self._filelist.extend(
                      (file, line) for line in range(l)
                  )
      # Create dict path for later read
      self._dict_path = os.path.join(
          root, folder_in_archive, _RELEASE_CONFIGS[release]["dict"]
      )
      self._phoneme_dict = None
  
file_path: audio/src/torchaudio/datasets/tedlium.py
imports: import os
  from pathlib import Path
  from typing import Tuple, Union
  import torchaudio
  from torch import Tensor
  from torch.utils.data import Dataset
  from torchaudio._internal import download_url_to_file
  from torchaudio.datasets.utils import _extract_tar
label_desc: Use image node_id 1 to create a new TEDLIUM object from inherited base classes: Dataset with example: obj = TEDLIUM(root, release, subset, download, audio_ext)