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: Play the given audio sample.
  
  :param utterance: The utterance id of the sample to play
docstr_tok: ["Play","the","given","audio","sample",".",":","param","utterance",":","The","utterance","id","of","the","sample","to","play"]
code: def play(self, utterance, start=0, end=None):
      """
      Play the given audio sample.
  
      :param utterance: The utterance id of the sample to play
      """
      # Method 1: os audio dev.
      try:
          import ossaudiodev
  
          try:
              dsp = ossaudiodev.open("w")
              dsp.setfmt(ossaudiodev.AFMT_S16_LE)
              dsp.channels(1)
              dsp.speed(16000)
              dsp.write(self.audiodata(utterance, start, end))
              dsp.close()
          except OSError as e:
              print(
                  (
                      "can't acquire the audio device; please "
                      "activate your audio device."
                  ),
                  file=sys.stderr,
              )
              print("system error message:", str(e), file=sys.stderr)
          return
      except ImportError:
          pass
  
      # Method 2: pygame
      try:
          # FIXME: this won't work under python 3
          import pygame.mixer
          import StringIO
  
          pygame.mixer.init(16000)
          f = StringIO.StringIO(self.wav(utterance, start, end))
          pygame.mixer.Sound(f).play()
          while pygame.mixer.get_busy():
              time.sleep(0.01)
          return
      except ImportError:
          pass
  
      # Method 3: complain. :)
      print(
          (
              "you must install pygame or ossaudiodev "
              "for audio playback."
          ),
          file=sys.stderr,
      )
  
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 20 for calling the TimitCorpusReader obj's underlying member method code with example usage: obj.play(utterance, start, end) without return types