text: import argparse
  import os
  import re
  from hparams import hparams, hparams_debug_string
  from synthesizer import Synthesizer
  import subprocess
  rand = open("./text.txt", "r+")
  rand = rand.readlines()
  x = ''.join(rand)
  sentences = [
      x
  ]
  
  
  def get_output_base_path(checkpoint_path):
    base_dir = os.path.dirname(checkpoint_path)
    m = re.compile(r'.*?\.ckpt\-([0-9]+)').match(checkpoint_path)
    name = 'eval-%d' % int(m.group(1)) if m else 'eval'
    return os.path.join(base_dir, name)
  
  
  def run_eval(args):
    print(hparams_debug_string())
    synth = Synthesizer()
    synth.load(args.checkpoint)
    base_path = get_output_base_path(args.checkpoint)
    for i, text in enumerate(sentences):
      path = '%s-%d.wav' % (base_path, i)
      print('Synthesizing: %s' % path)
      with open(path, 'wb') as f:
        f.write(synth.synthesize(text))
  
  
  def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('--checkpoint', help='Path to model checkpoint')
    parser.add_argument('--hparams', default='',
      help='Hyperparameter overrides as a comma-separated list of name=value pairs')
    args = parser.parse_args()
    os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
    hparams.parse(args.hparams)
    run_eval(args)
  
  
  if __name__ == '__main__':
    main()
    #import pygame
    #pygame.mixer.init()
    #pygame.mixer.music.load("./eval-0.wav")
    #pygame.mixer.music.play()
    #while pygame.mixer.music.get_busy() == True:
    #  continue
    #subprocess.call("rm -rf ./eval-0.wav",shell=True)
  