fixed progress

master
Malar Kannan 2017-10-26 16:18:17 +05:30
parent 7a520b79f4
commit a953fa3355
1 changed files with 5 additions and 5 deletions

View File

@ -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: