class_docstr: Reader for the TIMIT corpus (or any other corpus with the same
  file layout and use of file formats).  The corpus root directory
  should contain the following files:
  
    - timitdic.txt: dictionary of standard transcriptions
    - spkrinfo.txt: table of speaker information
  
  In addition, the root directory should contain one subdirectory
  for each speaker, containing three files for each utterance:
  
    - <utterance-id>.txt: text content of utterances
    - <utterance-id>.wrd: tokenized text content of utterances
    - <utterance-id>.phn: phonetic transcription of utterances
    - <utterance-id>.wav: utterance sound file
class_docstr_tok: ["Reader","for","the","TIMIT","corpus","(","or","any","other","corpus","with","the","same","file","layout","and","use","of","file","formats",")",".","The","corpus","root","directory","should","contain","the","following","files",":","-","timitdic.txt",":","dictionary","of","standard","transcriptions","-","spkrinfo.txt",":","table","of","speaker","information","In","addition",",","the","root","directory","should","contain","one","subdirectory","for","each","speaker",",","containing","three","files","for","each","utterance",":","-","<","utterance-id",">",".txt",":","text","content","of","utterances","-","<","utterance-id",">",".wrd",":","tokenized","text","content","of","utterances","-","<","utterance-id",">",".phn",":","phonetic","transcription","of","utterances","-","<","utterance-id",">",".wav",":","utterance","sound","file"]
docstr: Construct a new TIMIT corpus reader in the given directory.
  :param root: The root directory for this corpus.
docstr_tok: ["Construct","a","new","TIMIT","corpus","reader","in","the","given","directory",".",":","param","root",":","The","root","directory","for","this","corpus","."]
code: def __init__(self, root, encoding="utf8"):
      """
      Construct a new TIMIT corpus reader in the given directory.
      :param root: The root directory for this corpus.
      """
      # Ensure that wave files don't get treated as unicode data:
      if isinstance(encoding, str):
          encoding = [(r".*\.wav", None), (".*", encoding)]
  
      CorpusReader.__init__(
          self,
          root,
          find_corpus_fileids(root, self._FILE_RE),
          encoding=encoding,
      )
  
      self._utterances = [
          name[:-4]
          for name in find_corpus_fileids(root, self._UTTERANCE_RE)
      ]
      """A list of the utterance identifiers for all utterances in
          this corpus."""
  
      self._speakerinfo = None
      self._root = root
      self.speakers = sorted(
          {u.split("/")[0] for u in self._utterances}
      )
  
imports: import sys
  import time
  from nltk.corpus.reader.api import *
  from nltk.internals import import_from_stdlib
  from nltk.tree import Tree
label_desc: Use image node_id 1 to create a new TimitCorpusReader object from inherited base classes: CorpusReader with example: obj = TimitCorpusReader(root, encoding)