'Play the given audio sample.
:param utterance: The utterance id of the sample to play'

def play(self, utterance, start=0, end=None):

    try:
        import ossaudiodev
        try:
            dsp = ossaudiodev.open(u'w')
            dsp.setfmt(ossaudiodev.AFMT_S16_LE)
            dsp.channels(1)
            dsp.speed(16000)
            dsp.write(self.audiodata(utterance, start, end))
            dsp.close()
        except IOError as e:
            print(u"can't    acquire    the    audio    device;    please    activate    your    audio    device.", file=sys.stderr)
            print(u'system    error    message:', str(e), file=sys.stderr)
        return
    except ImportError:
        pass
    try:
        import pygame.mixer, 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
    print(u'you    must    install    pygame    or    ossaudiodev    for    audio    playback.', file=sys.stderr)
