From a953fa3355a13b84d7216aa2cac457a4783f5c4b Mon Sep 17 00:00:00 2001 From: Malar Kannan Date: Thu, 26 Oct 2017 16:18:17 +0530 Subject: [PATCH] fixed progress --- tts_samplegen.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tts_samplegen.py b/tts_samplegen.py index f7660ba..a7c318e 100644 --- a/tts_samplegen.py +++ b/tts_samplegen.py @@ -15,12 +15,12 @@ dest_file = './outputs/' + OUTPUT_NAME + '.csv' def prog_bar(title): - widgets = [progressbar.FormatLabel( - title), ' [', progressbar.Bar(), '] - ', progressbar.ETA()] + widgets = [title,progressbar.Counter(),'th entry - ', progressbar.FormatLabel( + ''), ' [', progressbar.Bar(), '] - ', progressbar.ETA()] prog = progressbar.ProgressBar(widgets=widgets) def update_prog(current): - widgets[0] = progressbar.FormatLabel('{} : {}'.format(title, current)) + widgets[3] = progressbar.FormatLabel(current) prog.update() return (update_prog, prog) @@ -36,7 +36,7 @@ def dest_filename(w, v, r, t): def dest_path(v, r, n): rel = v + '/' + str(r) + '/' + n - return (dest_dir + rel), rels + return (dest_dir + rel), rel def cli_gen_audio(speech_cmd, rate, voice, out_path): @@ -157,7 +157,7 @@ def synth_generator(): def synth_for_words(words, writer): # all_synths = [] - prog_title = "Synthesizing {} words, current word".format(len(words)) + prog_title = "Synthesizing {} words : ".format(len(words)) (update, prog) = prog_bar(prog_title) for w in prog(words): for s in voice_synths: