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"]
code: def wav(self, utterance, start=0, end=None):
      # nltk.chunk conflicts with the stdlib module 'chunk'
      wave = import_from_stdlib("wave")
  
      w = wave.open(self.open(utterance + ".wav"), "rb")
  
      if end is None:
          end = w.getnframes()
  
      # Skip past frames before start, then read the frames we want
      w.readframes(start)
      frames = w.readframes(end - start)
  
      # Open a new temporary file -- the wave module requires
      # an actual file, and won't work w/ stringio. :(
      tf = tempfile.TemporaryFile()
      out = wave.open(tf, "w")
  
      # Write the parameters & data to the new file.
      out.setparams(w.getparams())
      out.writeframes(frames)
      out.close()
  
      # Read the data back from the file, and return it.  The
      # file will automatically be deleted when we return.
      tf.seek(0)
      return tf.read()
  
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 17 for calling the TimitCorpusReader obj's underlying member method code with example usage: obj.wav(utterance, start, end) and returns: tf